diff options
Diffstat (limited to 'spec/outputs/codes_from_doc.lua')
-rw-r--r-- | spec/outputs/codes_from_doc.lua | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index 5c262d3..74db469 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
@@ -59,16 +59,21 @@ do | |||
59 | end | 59 | end |
60 | local funcA | 60 | local funcA |
61 | funcA = function() | 61 | funcA = function() |
62 | return "fail to assign to the Yue defined variable" | 62 | return "fail to assign to the Yue macro defined variable" |
63 | end | 63 | end |
64 | do | ||
64 | local function funcB() end | 65 | local function funcB() end |
66 | end | ||
67 | local funcB | ||
65 | funcB = function() | 68 | funcB = function() |
66 | return "assign to the Lua defined variable" | 69 | return "fail to assign to the Lua macro defined variable" |
67 | end | 70 | end |
71 | do | ||
68 | -- raw Lua codes insertion | 72 | -- raw Lua codes insertion |
69 | if cond then | 73 | if cond then |
70 | print("output") | 74 | print("output") |
71 | end | 75 | end |
76 | end | ||
72 | print("yuescript") | 77 | print("yuescript") |
73 | print(3) | 78 | print(3) |
74 | print("Valid enum type:", "Static") | 79 | print("Valid enum type:", "Static") |
@@ -2065,16 +2070,21 @@ do | |||
2065 | end | 2070 | end |
2066 | local funcA | 2071 | local funcA |
2067 | funcA = function() | 2072 | funcA = function() |
2068 | return "fail to assign to the Yue defined variable" | 2073 | return "fail to assign to the Yue macro defined variable" |
2069 | end | 2074 | end |
2075 | do | ||
2070 | local function funcB() end | 2076 | local function funcB() end |
2077 | end | ||
2078 | local funcB | ||
2071 | funcB = function() | 2079 | funcB = function() |
2072 | return "assign to the Lua defined variable" | 2080 | return "fail to assign to the Lua macro defined variable" |
2073 | end | 2081 | end |
2082 | do | ||
2074 | -- raw Lua codes insertion | 2083 | -- raw Lua codes insertion |
2075 | if cond then | 2084 | if cond then |
2076 | print("output") | 2085 | print("output") |
2077 | end | 2086 | end |
2087 | end | ||
2078 | print("yuescript") | 2088 | print("yuescript") |
2079 | print(3) | 2089 | print(3) |
2080 | print("Valid enum type:", "Static") | 2090 | print("Valid enum type:", "Static") |