diff options
Diffstat (limited to 'spec/outputs/codes_from_doc_zh.lua')
-rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua index 1a10555..a23044d 100644 --- a/spec/outputs/codes_from_doc_zh.lua +++ b/spec/outputs/codes_from_doc_zh.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("预先声明后续所有变量为局部变量") | 472 | print("预先声明后续所有变量为局部变量") |
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("只预先声明后续大写的变量为局部变量") | 482 | print("只预先声明后续大写的变量为局部变量") |
485 | local a = 1 | 483 | local a = 1 |
@@ -499,8 +497,7 @@ do | |||
499 | print("只预先声明大写的变量为全局变量") | 497 | print("只预先声明大写的变量为全局变量") |
500 | local a = 1 | 498 | local a = 1 |
501 | local B = 2 | 499 | local B = 2 |
502 | local Temp | 500 | local Temp = "一个局部值" |
503 | Temp = "一个局部值" | ||
504 | end | 501 | end |
505 | local thing = { | 502 | local thing = { |
506 | 1, | 503 | 1, |
@@ -2472,8 +2469,7 @@ local x = f() | |||
2472 | local y = x | 2469 | local y = x |
2473 | local z = x | 2470 | local z = x |
2474 | do | 2471 | do |
2475 | local a | 2472 | local a = 1 |
2476 | a = 1 | ||
2477 | local x, y, z | 2473 | local x, y, z |
2478 | print("预先声明后续所有变量为局部变量") | 2474 | print("预先声明后续所有变量为局部变量") |
2479 | x = function() | 2475 | x = function() |
@@ -2483,8 +2479,7 @@ do | |||
2483 | instance = Item:new() | 2479 | instance = Item:new() |
2484 | end | 2480 | end |
2485 | do | 2481 | do |
2486 | local X | 2482 | local X = 1 |
2487 | X = 1 | ||
2488 | local B | 2483 | local B |
2489 | print("只预先声明后续大写的变量为局部变量") | 2484 | print("只预先声明后续大写的变量为局部变量") |
2490 | local a = 1 | 2485 | local a = 1 |
@@ -2504,8 +2499,7 @@ do | |||
2504 | print("只预先声明大写的变量为全局变量") | 2499 | print("只预先声明大写的变量为全局变量") |
2505 | local a = 1 | 2500 | local a = 1 |
2506 | local B = 2 | 2501 | local B = 2 |
2507 | local Temp | 2502 | local Temp = "一个局部值" |
2508 | Temp = "一个局部值" | ||
2509 | end | 2503 | end |
2510 | local thing = { | 2504 | local thing = { |
2511 | 1, | 2505 | 1, |