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/macro.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/macro.lua')
| -rw-r--r-- | spec/outputs/macro.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/outputs/macro.lua b/spec/outputs/macro.lua index fbc1d48..f18baed 100644 --- a/spec/outputs/macro.lua +++ b/spec/outputs/macro.lua | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | assert(item == nil); | 1 | assert(item == nil) |
| 2 | local v = (item == nil) | 2 | local v = (item == nil) |
| 3 | if f1() then | 3 | if f1() then |
| 4 | print("OK") | 4 | print("OK") |
| @@ -170,11 +170,11 @@ do | |||
| 170 | end)() | 170 | end)() |
| 171 | print(a) | 171 | print(a) |
| 172 | end | 172 | end |
| 173 | local x = 0; | 173 | local x = 0 |
| 174 | local function f(a) | 174 | local function f(a) |
| 175 | return a + 1 | 175 | return a + 1 |
| 176 | end | 176 | end |
| 177 | x = x + f(3); | 177 | x = x + f(3) |
| 178 | function tb:func() | 178 | function tb:func() |
| 179 | print(123) | 179 | print(123) |
| 180 | end | 180 | end |
| @@ -277,7 +277,7 @@ print((setmetatable({ | |||
| 277 | return 998 | 277 | return 998 |
| 278 | end | 278 | end |
| 279 | })) | 279 | })) |
| 280 | print("current line: " .. tostring(268)); | 280 | print("current line: " .. tostring(268)) |
| 281 | -- TODO | 281 | -- TODO |
| 282 | do | 282 | do |
| 283 | print(1) | 283 | print(1) |
