diff options
author | Li Jin <dragon-fly@qq.com> | 2023-06-25 17:46:32 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-06-25 17:46:32 +0800 |
commit | cd618f934b0e4a30bd6cd4e98f8c1005bf3d6193 (patch) | |
tree | 5bc8bc55f80fe74a3b73101b55eabc60ae1d75c3 /spec/outputs/attrib.lua | |
parent | 5d246757285a437401347dd6a1a1f8d3cf61e08c (diff) | |
download | yuescript-cd618f934b0e4a30bd6cd4e98f8c1005bf3d6193.tar.gz yuescript-cd618f934b0e4a30bd6cd4e98f8c1005bf3d6193.tar.bz2 yuescript-cd618f934b0e4a30bd6cd4e98f8c1005bf3d6193.zip |
fix more ambiguous Lua codes generation cases.
Diffstat (limited to 'spec/outputs/attrib.lua')
-rw-r--r-- | spec/outputs/attrib.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/outputs/attrib.lua b/spec/outputs/attrib.lua index fbac28e..aaff747 100644 --- a/spec/outputs/attrib.lua +++ b/spec/outputs/attrib.lua | |||
@@ -64,12 +64,12 @@ do | |||
64 | local _with_0 = io.open("file.txt") | 64 | local _with_0 = io.open("file.txt") |
65 | _with_0:write("Hello") | 65 | _with_0:write("Hello") |
66 | return _with_0 | 66 | return _with_0 |
67 | end)(); | 67 | end)() |
68 | local _ <close> = setmetatable({ }, { | 68 | local _ <close> = setmetatable({ }, { |
69 | __close = function(self) | 69 | __close = function(self) |
70 | return print("second") | 70 | return print("second") |
71 | end | 71 | end |
72 | }); | 72 | }) |
73 | local _ <close> = setmetatable({ }, { | 73 | local _ <close> = setmetatable({ }, { |
74 | __close = function() | 74 | __close = function() |
75 | return print("first") | 75 | return print("first") |
@@ -86,11 +86,11 @@ do | |||
86 | _defers[#_defers + 1] = function() | 86 | _defers[#_defers + 1] = function() |
87 | return print(3) | 87 | return print(3) |
88 | end | 88 | end |
89 | local _ <close> = _defers; | 89 | local _ <close> = _defers |
90 | _defers[#_defers + 1] = function() | 90 | _defers[#_defers + 1] = function() |
91 | return print(2) | 91 | return print(2) |
92 | end | 92 | end |
93 | local _ <close> = _defers; | 93 | local _ <close> = _defers |
94 | _defers[#_defers + 1] = function() | 94 | _defers[#_defers + 1] = function() |
95 | return print(1) | 95 | return print(1) |
96 | end | 96 | end |