diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-10-22 00:55:02 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-10-22 00:55:02 +0800 |
| commit | 652a8839f885b73fff57942a9db8b26e9cb5233b (patch) | |
| tree | 0b24bb5610823a831ec0addbba37cb6200203b27 /spec/outputs/lists.lua | |
| parent | f61a4a1d9a1b979b8a0c2e8a9c194a284f42220f (diff) | |
| download | yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.tar.gz yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.tar.bz2 yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.zip | |
fixing issues from #152.
Diffstat (limited to 'spec/outputs/lists.lua')
| -rw-r--r-- | spec/outputs/lists.lua | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/spec/outputs/lists.lua b/spec/outputs/lists.lua index 581cc23..e6f306d 100644 --- a/spec/outputs/lists.lua +++ b/spec/outputs/lists.lua | |||
| @@ -273,10 +273,73 @@ for _index_0 = 1, #test do | |||
| 273 | local thing = test[_index_0] | 273 | local thing = test[_index_0] |
| 274 | print(thing) | 274 | print(thing) |
| 275 | end | 275 | end |
| 276 | return function() | 276 | _ = function() |
| 277 | local _list_0 = rows | 277 | local _list_0 = rows |
| 278 | for _index_0 = 1, #_list_0 do | 278 | for _index_0 = 1, #_list_0 do |
| 279 | local row = _list_0[_index_0] | 279 | local row = _list_0[_index_0] |
| 280 | a = b | 280 | a = b |
| 281 | end | 281 | end |
| 282 | end | 282 | end |
| 283 | do | ||
| 284 | local _with_0 = tb | ||
| 285 | f(_with_0[a]) | ||
| 286 | f({ | ||
| 287 | a | ||
| 288 | }) | ||
| 289 | local _list_0 = f | ||
| 290 | for _index_0 = a, #_list_0 do | ||
| 291 | local v = _list_0[_index_0] | ||
| 292 | print(v) | ||
| 293 | end | ||
| 294 | f({ }) | ||
| 295 | do | ||
| 296 | local _obj_0 = f | ||
| 297 | _obj_0[#_obj_0 + 1] = x | ||
| 298 | end | ||
| 299 | _with_0[a] = x | ||
| 300 | a = x[1] | ||
| 301 | _with_0[#_with_0 + 1] = x | ||
| 302 | do | ||
| 303 | local _check_0 = _with_0[1] | ||
| 304 | local _find_0 = false | ||
| 305 | for _index_0 = 1, #_check_0 do | ||
| 306 | local _item_0 = _check_0[_index_0] | ||
| 307 | if _item_0 == a then | ||
| 308 | _find_0 = true | ||
| 309 | break | ||
| 310 | end | ||
| 311 | end | ||
| 312 | c = _find_0 | ||
| 313 | end | ||
| 314 | c = (1 == a) | ||
| 315 | c = (1 == a) | ||
| 316 | do | ||
| 317 | local _check_0 = { | ||
| 318 | 1 | ||
| 319 | } | ||
| 320 | local _find_0 = false | ||
| 321 | for _index_0 = 1, #_check_0 do | ||
| 322 | local _item_0 = _check_0[_index_0] | ||
| 323 | if _item_0 == a then | ||
| 324 | _find_0 = true | ||
| 325 | break | ||
| 326 | end | ||
| 327 | end | ||
| 328 | c = _find_0 | ||
| 329 | end | ||
| 330 | end | ||
| 331 | do | ||
| 332 | a, b = hello[1], hello[2] | ||
| 333 | local name, job | ||
| 334 | do | ||
| 335 | local _obj_0 = person | ||
| 336 | name, job = _obj_0[1], _obj_0[2] | ||
| 337 | if name == nil then | ||
| 338 | name = "nameless" | ||
| 339 | end | ||
| 340 | if job == nil then | ||
| 341 | job = "jobless" | ||
| 342 | end | ||
| 343 | end | ||
| 344 | end | ||
| 345 | return nil | ||
