From d1878f2b8eb1644205c5e0b641fd092e8b222766 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 31 Jan 2025 23:17:45 +0800 Subject: Aligned Lua inserter macro behavior with common Yue macro. --- spec/outputs/codes_from_doc.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'spec/outputs/codes_from_doc.lua') 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 end local funcA funcA = function() - return "fail to assign to the Yue defined variable" + return "fail to assign to the Yue macro defined variable" end +do local function funcB() end +end +local funcB funcB = function() - return "assign to the Lua defined variable" + return "fail to assign to the Lua macro defined variable" end +do -- raw Lua codes insertion if cond then print("output") end +end print("yuescript") print(3) print("Valid enum type:", "Static") @@ -2065,16 +2070,21 @@ do end local funcA funcA = function() - return "fail to assign to the Yue defined variable" + return "fail to assign to the Yue macro defined variable" end +do local function funcB() end +end +local funcB funcB = function() - return "assign to the Lua defined variable" + return "fail to assign to the Lua macro defined variable" end +do -- raw Lua codes insertion if cond then print("output") end +end print("yuescript") print(3) print("Valid enum type:", "Static") -- cgit v1.2.3-55-g6feb