diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-03-19 14:52:54 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-03-19 14:52:54 +0800 |
| commit | 28bae6517f43c384a828df62b727517e26b3af9b (patch) | |
| tree | d8c54b0f4a43e2b2dce3cafdae869f535f4c85aa /spec/outputs/codes_from_doc.lua | |
| parent | cefe5e3e8e9fa33b5f644edb5f34d0bed42ec402 (diff) | |
| download | yuescript-28bae6517f43c384a828df62b727517e26b3af9b.tar.gz yuescript-28bae6517f43c384a828df62b727517e26b3af9b.tar.bz2 yuescript-28bae6517f43c384a828df62b727517e26b3af9b.zip | |
Fixed issue #194, #195.v0.27.1
Diffstat (limited to 'spec/outputs/codes_from_doc.lua')
| -rw-r--r-- | spec/outputs/codes_from_doc.lua | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index 74db469..a37b459 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
| @@ -467,8 +467,7 @@ local x = f() | |||
| 467 | local y = x | 467 | local y = x |
| 468 | local z = x | 468 | local z = x |
| 469 | do | 469 | do |
| 470 | local a | 470 | local a = 1 |
| 471 | a = 1 | ||
| 472 | local x, y, z | 471 | local x, y, z |
| 473 | print("forward declare all variables as locals") | 472 | print("forward declare all variables as locals") |
| 474 | x = function() | 473 | x = function() |
| @@ -478,8 +477,7 @@ do | |||
| 478 | instance = Item:new() | 477 | instance = Item:new() |
| 479 | end | 478 | end |
| 480 | do | 479 | do |
| 481 | local X | 480 | local X = 1 |
| 482 | X = 1 | ||
| 483 | local B | 481 | local B |
| 484 | print("only forward declare upper case variables") | 482 | print("only forward declare upper case variables") |
| 485 | local a = 1 | 483 | local a = 1 |
| @@ -499,8 +497,7 @@ do | |||
| 499 | print("only declare upper case variables as globals") | 497 | print("only declare upper case variables as globals") |
| 500 | local a = 1 | 498 | local a = 1 |
| 501 | local B = 2 | 499 | local B = 2 |
| 502 | local Temp | 500 | local Temp = "a local value" |
| 503 | Temp = "a local value" | ||
| 504 | end | 501 | end |
| 505 | local thing = { | 502 | local thing = { |
| 506 | 1, | 503 | 1, |
| @@ -2478,8 +2475,7 @@ local x = f() | |||
| 2478 | local y = x | 2475 | local y = x |
| 2479 | local z = x | 2476 | local z = x |
| 2480 | do | 2477 | do |
| 2481 | local a | 2478 | local a = 1 |
| 2482 | a = 1 | ||
| 2483 | local x, y, z | 2479 | local x, y, z |
| 2484 | print("forward declare all variables as locals") | 2480 | print("forward declare all variables as locals") |
| 2485 | x = function() | 2481 | x = function() |
| @@ -2489,8 +2485,7 @@ do | |||
| 2489 | instance = Item:new() | 2485 | instance = Item:new() |
| 2490 | end | 2486 | end |
| 2491 | do | 2487 | do |
| 2492 | local X | 2488 | local X = 1 |
| 2493 | X = 1 | ||
| 2494 | local B | 2489 | local B |
| 2495 | print("only forward declare upper case variables") | 2490 | print("only forward declare upper case variables") |
| 2496 | local a = 1 | 2491 | local a = 1 |
| @@ -2510,8 +2505,7 @@ do | |||
| 2510 | print("only declare upper case variables as globals") | 2505 | print("only declare upper case variables as globals") |
| 2511 | local a = 1 | 2506 | local a = 1 |
| 2512 | local B = 2 | 2507 | local B = 2 |
| 2513 | local Temp | 2508 | local Temp = "a local value" |
| 2514 | Temp = "a local value" | ||
| 2515 | end | 2509 | end |
| 2516 | local thing = { | 2510 | local thing = { |
| 2517 | 1, | 2511 | 1, |
