aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/codes_from_doc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/outputs/codes_from_doc.lua')
-rw-r--r--spec/outputs/codes_from_doc.lua18
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
59end 59end
60local funcA 60local funcA
61funcA = function() 61funcA = function()
62 return "fail to assign to the Yue defined variable" 62 return "fail to assign to the Yue macro defined variable"
63end 63end
64do
64local function funcB() end 65local function funcB() end
66end
67local funcB
65funcB = function() 68funcB = function()
66 return "assign to the Lua defined variable" 69 return "fail to assign to the Lua macro defined variable"
67end 70end
71do
68-- raw Lua codes insertion 72-- raw Lua codes insertion
69if cond then 73if cond then
70 print("output") 74 print("output")
71end 75end
76end
72print("yuescript") 77print("yuescript")
73print(3) 78print(3)
74print("Valid enum type:", "Static") 79print("Valid enum type:", "Static")
@@ -2065,16 +2070,21 @@ do
2065end 2070end
2066local funcA 2071local funcA
2067funcA = function() 2072funcA = function()
2068 return "fail to assign to the Yue defined variable" 2073 return "fail to assign to the Yue macro defined variable"
2069end 2074end
2075do
2070local function funcB() end 2076local function funcB() end
2077end
2078local funcB
2071funcB = function() 2079funcB = function()
2072 return "assign to the Lua defined variable" 2080 return "fail to assign to the Lua macro defined variable"
2073end 2081end
2082do
2074-- raw Lua codes insertion 2083-- raw Lua codes insertion
2075if cond then 2084if cond then
2076 print("output") 2085 print("output")
2077end 2086end
2087end
2078print("yuescript") 2088print("yuescript")
2079print(3) 2089print(3)
2080print("Valid enum type:", "Static") 2090print("Valid enum type:", "Static")