diff options
author | Li Jin <dragon-fly@qq.com> | 2025-01-08 09:38:01 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2025-01-08 09:38:01 +0800 |
commit | e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4 (patch) | |
tree | 31df5c2ef971f2739e31e032e7e1bc4c4a99ade7 /spec | |
parent | 1bfcc36f001cd129a4213ca19f26f3d688eb94ff (diff) | |
download | yuescript-e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4.tar.gz yuescript-e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4.tar.bz2 yuescript-e1fb0ca515c7b4e79b78cdc8b0352718a1b03dc4.zip |
Updated spec codes.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/outputs/codes_from_doc.lua | 12 | ||||
-rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 12 |
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 | }) |
41 | if (getmetatable(apple) ~= nil) then | 41 | if (getmetatable(apple) ~= nil) then |
42 | p(apple.color, getmetatable(apple).__index) | 42 | p(apple.size, apple.color, getmetatable(apple).__index) |
43 | end | 43 | end |
44 | local _ud83c_udf1b = "月之脚本" | 44 | local _ud83c_udf1b = "月之脚本" |
45 | _module_0["🌛"] = _ud83c_udf1b | 45 | _module_0["🌛"] = _ud83c_udf1b |
@@ -59,11 +59,11 @@ do | |||
59 | end | 59 | end |
60 | local funcA | 60 | local funcA |
61 | funcA = function() | 61 | funcA = function() |
62 | return "assign the Yue defined variable" | 62 | return "fail to assign to the Yue defined variable" |
63 | end | 63 | end |
64 | local function funcB() end | 64 | local function funcB() end |
65 | funcB = function() | 65 | funcB = function() |
66 | return "assign the Lua defined variable" | 66 | return "assign to the Lua defined variable" |
67 | end | 67 | end |
68 | -- raw Lua codes insertion | 68 | -- raw Lua codes insertion |
69 | if cond then | 69 | if cond then |
@@ -2045,7 +2045,7 @@ local apple = setmetatable({ | |||
2045 | } | 2045 | } |
2046 | }) | 2046 | }) |
2047 | if (getmetatable(apple) ~= nil) then | 2047 | if (getmetatable(apple) ~= nil) then |
2048 | p(apple.color, getmetatable(apple).__index) | 2048 | p(apple.size, apple.color, getmetatable(apple).__index) |
2049 | end | 2049 | end |
2050 | local _ud83c_udf1b = "月之脚本" | 2050 | local _ud83c_udf1b = "月之脚本" |
2051 | _module_0["🌛"] = _ud83c_udf1b | 2051 | _module_0["🌛"] = _ud83c_udf1b |
@@ -2065,11 +2065,11 @@ do | |||
2065 | end | 2065 | end |
2066 | local funcA | 2066 | local funcA |
2067 | funcA = function() | 2067 | funcA = function() |
2068 | return "assign the Yue defined variable" | 2068 | return "fail to assign to the Yue defined variable" |
2069 | end | 2069 | end |
2070 | local function funcB() end | 2070 | local function funcB() end |
2071 | funcB = function() | 2071 | funcB = function() |
2072 | return "assign the Lua defined variable" | 2072 | return "assign to the Lua defined variable" |
2073 | end | 2073 | end |
2074 | -- raw Lua codes insertion | 2074 | -- raw Lua codes insertion |
2075 | if cond then | 2075 | if 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 | }) |
41 | if (getmetatable(apple) ~= nil) then | 41 | if (getmetatable(apple) ~= nil) then |
42 | p(apple.color, getmetatable(apple).__index) | 42 | p(apple.size, apple.color, getmetatable(apple).__index) |
43 | end | 43 | end |
44 | local _ud83c_udf1b = "月之脚本" | 44 | local _ud83c_udf1b = "月之脚本" |
45 | _module_0["🌛"] = _ud83c_udf1b | 45 | _module_0["🌛"] = _ud83c_udf1b |
@@ -59,11 +59,11 @@ do | |||
59 | end | 59 | end |
60 | local funcA | 60 | local funcA |
61 | funcA = function() | 61 | funcA = function() |
62 | return "访问月之脚本定义的变量" | 62 | return "无法访问宏生之脚本里定义的变量" |
63 | end | 63 | end |
64 | local function funcB() end | 64 | local function funcB() end |
65 | funcB = function() | 65 | funcB = function() |
66 | return "访问Lua代码里定义的变量" | 66 | return "访问宏生成Lua代码里定义的变量" |
67 | end | 67 | end |
68 | -- 插入原始Lua代码 | 68 | -- 插入原始Lua代码 |
69 | if cond then | 69 | if cond then |
@@ -2039,7 +2039,7 @@ local apple = setmetatable({ | |||
2039 | } | 2039 | } |
2040 | }) | 2040 | }) |
2041 | if (getmetatable(apple) ~= nil) then | 2041 | if (getmetatable(apple) ~= nil) then |
2042 | p(apple.color, getmetatable(apple).__index) | 2042 | p(apple.size, apple.color, getmetatable(apple).__index) |
2043 | end | 2043 | end |
2044 | local _ud83c_udf1b = "月之脚本" | 2044 | local _ud83c_udf1b = "月之脚本" |
2045 | _module_0["🌛"] = _ud83c_udf1b | 2045 | _module_0["🌛"] = _ud83c_udf1b |
@@ -2059,11 +2059,11 @@ do | |||
2059 | end | 2059 | end |
2060 | local funcA | 2060 | local funcA |
2061 | funcA = function() | 2061 | funcA = function() |
2062 | return "访问月之脚本定义的变量" | 2062 | return "无法访问宏生之脚本里定义的变量" |
2063 | end | 2063 | end |
2064 | local function funcB() end | 2064 | local function funcB() end |
2065 | funcB = function() | 2065 | funcB = function() |
2066 | return "访问Lua代码里定义的变量" | 2066 | return "访问宏生成Lua代码里定义的变量" |
2067 | end | 2067 | end |
2068 | -- 插入原始Lua代码 | 2068 | -- 插入原始Lua代码 |
2069 | if cond then | 2069 | if cond then |