aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2025-01-08 09:38:01 +0800
committerLi Jin <dragon-fly@qq.com>2025-01-08 09:38:01 +0800
commite1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4 (patch)
tree31df5c2ef971f2739e31e032e7e1bc4c4a99ade7
parent1bfcc36f001cd129a4213ca19f26f3d688eb94ff (diff)
downloadyuescript-e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4.tar.gz
yuescript-e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4.tar.bz2
yuescript-e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4.zip
Updated spec codes.
-rw-r--r--spec/outputs/codes_from_doc.lua12
-rw-r--r--spec/outputs/codes_from_doc_zh.lua12
2 files changed, 12 insertions, 12 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua
index e2bba8e..5c262d3 100644
--- a/spec/outputs/codes_from_doc.lua
+++ b/spec/outputs/codes_from_doc.lua
@@ -39,7 +39,7 @@ local apple = setmetatable({
39 } 39 }
40}) 40})
41if (getmetatable(apple) ~= nil) then 41if (getmetatable(apple) ~= nil) then
42 p(apple.color, getmetatable(apple).__index) 42 p(apple.size, apple.color, getmetatable(apple).__index)
43end 43end
44local _ud83c_udf1b = "月之脚本" 44local _ud83c_udf1b = "月之脚本"
45_module_0["🌛"] = _ud83c_udf1b 45_module_0["🌛"] = _ud83c_udf1b
@@ -59,11 +59,11 @@ do
59end 59end
60local funcA 60local funcA
61funcA = function() 61funcA = function()
62 return "assign the Yue defined variable" 62 return "fail to assign to the Yue defined variable"
63end 63end
64local function funcB() end 64local function funcB() end
65funcB = function() 65funcB = function()
66 return "assign the Lua defined variable" 66 return "assign to the Lua defined variable"
67end 67end
68-- raw Lua codes insertion 68-- raw Lua codes insertion
69if cond then 69if cond then
@@ -2045,7 +2045,7 @@ local apple = setmetatable({
2045 } 2045 }
2046}) 2046})
2047if (getmetatable(apple) ~= nil) then 2047if (getmetatable(apple) ~= nil) then
2048 p(apple.color, getmetatable(apple).__index) 2048 p(apple.size, apple.color, getmetatable(apple).__index)
2049end 2049end
2050local _ud83c_udf1b = "月之脚本" 2050local _ud83c_udf1b = "月之脚本"
2051_module_0["🌛"] = _ud83c_udf1b 2051_module_0["🌛"] = _ud83c_udf1b
@@ -2065,11 +2065,11 @@ do
2065end 2065end
2066local funcA 2066local funcA
2067funcA = function() 2067funcA = function()
2068 return "assign the Yue defined variable" 2068 return "fail to assign to the Yue defined variable"
2069end 2069end
2070local function funcB() end 2070local function funcB() end
2071funcB = function() 2071funcB = function()
2072 return "assign the Lua defined variable" 2072 return "assign to the Lua defined variable"
2073end 2073end
2074-- raw Lua codes insertion 2074-- raw Lua codes insertion
2075if cond then 2075if cond then
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua
index 4839525..c6d5388 100644
--- a/spec/outputs/codes_from_doc_zh.lua
+++ b/spec/outputs/codes_from_doc_zh.lua
@@ -39,7 +39,7 @@ local apple = setmetatable({
39 } 39 }
40}) 40})
41if (getmetatable(apple) ~= nil) then 41if (getmetatable(apple) ~= nil) then
42 p(apple.color, getmetatable(apple).__index) 42 p(apple.size, apple.color, getmetatable(apple).__index)
43end 43end
44local _ud83c_udf1b = "月之脚本" 44local _ud83c_udf1b = "月之脚本"
45_module_0["🌛"] = _ud83c_udf1b 45_module_0["🌛"] = _ud83c_udf1b
@@ -59,11 +59,11 @@ do
59end 59end
60local funcA 60local funcA
61funcA = function() 61funcA = function()
62 return "访问月之脚本定义的变量" 62 return "无法访问宏生之脚本定义的变量"
63end 63end
64local function funcB() end 64local function funcB() end
65funcB = function() 65funcB = function()
66 return "访问Lua代码里定义的变量" 66 return "访问宏生成Lua代码里定义的变量"
67end 67end
68-- 插入原始Lua代码 68-- 插入原始Lua代码
69if cond then 69if cond then
@@ -2039,7 +2039,7 @@ local apple = setmetatable({
2039 } 2039 }
2040}) 2040})
2041if (getmetatable(apple) ~= nil) then 2041if (getmetatable(apple) ~= nil) then
2042 p(apple.color, getmetatable(apple).__index) 2042 p(apple.size, apple.color, getmetatable(apple).__index)
2043end 2043end
2044local _ud83c_udf1b = "月之脚本" 2044local _ud83c_udf1b = "月之脚本"
2045_module_0["🌛"] = _ud83c_udf1b 2045_module_0["🌛"] = _ud83c_udf1b
@@ -2059,11 +2059,11 @@ do
2059end 2059end
2060local funcA 2060local funcA
2061funcA = function() 2061funcA = function()
2062 return "访问月之脚本定义的变量" 2062 return "无法访问宏生之脚本定义的变量"
2063end 2063end
2064local function funcB() end 2064local function funcB() end
2065funcB = function() 2065funcB = function()
2066 return "访问Lua代码里定义的变量" 2066 return "访问宏生成Lua代码里定义的变量"
2067end 2067end
2068-- 插入原始Lua代码 2068-- 插入原始Lua代码
2069if cond then 2069if cond then