diff options
author | Li Jin <dragon-fly@qq.com> | 2023-01-29 16:39:35 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-01-29 16:39:35 +0800 |
commit | 8d648dc8c075fc1cf8d89d74c1425cdeb47e8089 (patch) | |
tree | d038d12f7e683e490a36d431376c2da6dd2b17bf /spec/outputs/loops.lua | |
parent | e10b1b163a9a173f32b956bf1fb9be00194352b5 (diff) | |
download | yuescript-8d648dc8c075fc1cf8d89d74c1425cdeb47e8089.tar.gz yuescript-8d648dc8c075fc1cf8d89d74c1425cdeb47e8089.tar.bz2 yuescript-8d648dc8c075fc1cf8d89d74c1425cdeb47e8089.zip |
refactor break loop keyword checking.
Diffstat (limited to 'spec/outputs/loops.lua')
-rw-r--r-- | spec/outputs/loops.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/outputs/loops.lua b/spec/outputs/loops.lua index eeea15f..79ef789 100644 --- a/spec/outputs/loops.lua +++ b/spec/outputs/loops.lua | |||
@@ -294,3 +294,44 @@ do | |||
294 | print(thing) | 294 | print(thing) |
295 | end | 295 | end |
296 | end | 296 | end |
297 | do | ||
298 | for i = 1, 10 do | ||
299 | repeat | ||
300 | do | ||
301 | local _with_0 = tb | ||
302 | if _with_0 ~= nil then | ||
303 | _with_0.a = 1 | ||
304 | if _with_0.b then | ||
305 | goto _continue_12 | ||
306 | end | ||
307 | do | ||
308 | if _with_0.c then | ||
309 | break | ||
310 | end | ||
311 | end | ||
312 | end | ||
313 | end | ||
314 | ::_continue_12:: | ||
315 | until true | ||
316 | if 123 == x then | ||
317 | break | ||
318 | else | ||
319 | goto _continue_11 | ||
320 | end | ||
321 | if y then | ||
322 | goto _continue_11 | ||
323 | else | ||
324 | break | ||
325 | end | ||
326 | do | ||
327 | do | ||
328 | do | ||
329 | print(i) | ||
330 | goto _continue_11 | ||
331 | end | ||
332 | end | ||
333 | end | ||
334 | print("abc") | ||
335 | ::_continue_11:: | ||
336 | end | ||
337 | end | ||