aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/docs/de/doc/advanced/do.md44
-rw-r--r--doc/docs/de/doc/objects/with-statement.md4
-rw-r--r--doc/docs/doc/advanced/do.md44
-rw-r--r--doc/docs/doc/objects/with-statement.md4
-rw-r--r--doc/docs/id-id/doc/advanced/do.md44
-rw-r--r--doc/docs/id-id/doc/objects/with-statement.md4
-rw-r--r--doc/docs/pt-br/doc/advanced/do.md44
-rw-r--r--doc/docs/pt-br/doc/objects/with-statement.md4
-rw-r--r--doc/docs/zh/doc/advanced/do.md44
-rw-r--r--doc/docs/zh/doc/objects/with-statement.md4
-rw-r--r--doc/yue-de.md22
-rw-r--r--doc/yue-en.md26
-rw-r--r--doc/yue-id-id.md22
-rw-r--r--doc/yue-pt-br.md22
-rw-r--r--doc/yue-zh.md22
-rw-r--r--spec/outputs/codes_from_doc_de.lua38
-rw-r--r--spec/outputs/codes_from_doc_en.lua38
-rw-r--r--spec/outputs/codes_from_doc_id-id.lua38
-rw-r--r--spec/outputs/codes_from_doc_pt-br.lua38
-rw-r--r--spec/outputs/codes_from_doc_zh.lua38
20 files changed, 276 insertions, 268 deletions
diff --git a/doc/docs/de/doc/advanced/do.md b/doc/docs/de/doc/advanced/do.md
index c6c41cf..b0a442a 100644
--- a/doc/docs/de/doc/advanced/do.md
+++ b/doc/docs/de/doc/advanced/do.md
@@ -20,27 +20,7 @@ print var -- nil hier
20 20
21</YueDisplay> 21</YueDisplay>
22 22
23YueScripts **do** kann auch als Ausdruck verwendet werden. So kannst du mehrere Zeilen in einem Ausdruck kombinieren. Das Ergebnis des `do`-Ausdrucks ist die letzte Anweisung im Block. `do`-Ausdrücke unterstützen die Verwendung von `break`, um den Kontrollfluss zu unterbrechen und mehrere Rückgabewerte vorzeitig zurückzugeben. 23YueScripts **do** kann auch als Ausdruck verwendet werden. So kannst du mehrere Zeilen in einem Ausdruck kombinieren. Das Ergebnis des `do`-Ausdrucks ist die letzte Anweisung im Block.
24
25```yuescript
26status, value = do
27 n = 12
28 if n > 10
29 break "large", n
30 break "small", n
31```
32
33<YueDisplay>
34
35```yue
36status, value = do
37 n = 12
38 if n > 10
39 break "large", n
40 break "small", n
41```
42
43</YueDisplay>
44 24
45```yuescript 25```yuescript
46counter = do 26counter = do
@@ -87,3 +67,25 @@ tbl = {
87``` 67```
88 68
89</YueDisplay> 69</YueDisplay>
70
71`do`-Ausdrücke unterstützen die Verwendung von `break`, um den Kontrollfluss zu unterbrechen und mehrere Rückgabewerte vorzeitig zurückzugeben.
72
73```yuescript
74status, value = do
75 n = 12
76 if n > 10
77 break "large", n
78 break "small", n
79```
80
81<YueDisplay>
82
83```yue
84status, value = do
85 n = 12
86 if n > 10
87 break "large", n
88 break "small", n
89```
90
91</YueDisplay>
diff --git a/doc/docs/de/doc/objects/with-statement.md b/doc/docs/de/doc/objects/with-statement.md
index f299902..2eb6039 100644
--- a/doc/docs/de/doc/objects/with-statement.md
+++ b/doc/docs/de/doc/objects/with-statement.md
@@ -162,14 +162,14 @@ with tb
162 162
163```yuescript 163```yuescript
164with? obj 164with? obj
165 print obj.name 165 print .name
166``` 166```
167 167
168<YueDisplay> 168<YueDisplay>
169 169
170```yue 170```yue
171with? obj 171with? obj
172 print obj.name 172 print .name
173``` 173```
174 174
175</YueDisplay> 175</YueDisplay>
diff --git a/doc/docs/doc/advanced/do.md b/doc/docs/doc/advanced/do.md
index e13b025..40fd9fe 100644
--- a/doc/docs/doc/advanced/do.md
+++ b/doc/docs/doc/advanced/do.md
@@ -22,28 +22,6 @@ print var -- nil here
22 22
23YueScript's **do** can also be used an expression . Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body. 23YueScript's **do** can also be used an expression . Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body.
24 24
25`do` expressions also support using `break` to interrupt control flow and return multiple values early:
26
27```yuescript
28status, value = do
29 n = 12
30 if n > 10
31 break "large", n
32 break "small", n
33```
34
35<YueDisplay>
36
37```yue
38status, value = do
39 n = 12
40 if n > 10
41 break "large", n
42 break "small", n
43```
44
45</YueDisplay>
46
47```yuescript 25```yuescript
48counter = do 26counter = do
49 i = 0 27 i = 0
@@ -89,3 +67,25 @@ tbl = {
89``` 67```
90 68
91</YueDisplay> 69</YueDisplay>
70
71`do` expressions also support using `break` to interrupt control flow and return multiple values early:
72
73```yuescript
74status, value = do
75 n = 12
76 if n > 10
77 break "large", n
78 break "small", n
79```
80
81<YueDisplay>
82
83```yue
84status, value = do
85 n = 12
86 if n > 10
87 break "large", n
88 break "small", n
89```
90
91</YueDisplay>
diff --git a/doc/docs/doc/objects/with-statement.md b/doc/docs/doc/objects/with-statement.md
index 9173f9c..f6a5ae2 100644
--- a/doc/docs/doc/objects/with-statement.md
+++ b/doc/docs/doc/objects/with-statement.md
@@ -162,14 +162,14 @@ with tb
162 162
163```yuescript 163```yuescript
164with? obj 164with? obj
165 print obj.name 165 print .name
166``` 166```
167 167
168<YueDisplay> 168<YueDisplay>
169 169
170```yue 170```yue
171with? obj 171with? obj
172 print obj.name 172 print .name
173``` 173```
174 174
175</YueDisplay> 175</YueDisplay>
diff --git a/doc/docs/id-id/doc/advanced/do.md b/doc/docs/id-id/doc/advanced/do.md
index 52ef5dc..3c439d3 100644
--- a/doc/docs/id-id/doc/advanced/do.md
+++ b/doc/docs/id-id/doc/advanced/do.md
@@ -20,27 +20,7 @@ print var -- nil di sini
20 20
21</YueDisplay> 21</YueDisplay>
22 22
23`do` di YueScript juga bisa digunakan sebagai ekspresi, memungkinkan Anda menggabungkan beberapa baris menjadi satu. Hasil ekspresi `do` adalah pernyataan terakhir di badannya. Ekspresi `do` mendukung penggunaan `break` untuk memutus alur eksekusi dan mengembalikan banyak nilai lebih awal. 23`do` di YueScript juga bisa digunakan sebagai ekspresi, memungkinkan Anda menggabungkan beberapa baris menjadi satu. Hasil ekspresi `do` adalah pernyataan terakhir di badannya.
24
25```yuescript
26status, value = do
27 n = 12
28 if n > 10
29 break "large", n
30 break "small", n
31```
32
33<YueDisplay>
34
35```yue
36status, value = do
37 n = 12
38 if n > 10
39 break "large", n
40 break "small", n
41```
42
43</YueDisplay>
44 24
45```yuescript 25```yuescript
46counter = do 26counter = do
@@ -87,3 +67,25 @@ tbl = {
87``` 67```
88 68
89</YueDisplay> 69</YueDisplay>
70
71Ekspresi `do` mendukung penggunaan `break` untuk memutus alur eksekusi dan mengembalikan banyak nilai lebih awal.
72
73```yuescript
74status, value = do
75 n = 12
76 if n > 10
77 break "large", n
78 break "small", n
79```
80
81<YueDisplay>
82
83```yue
84status, value = do
85 n = 12
86 if n > 10
87 break "large", n
88 break "small", n
89```
90
91</YueDisplay>
diff --git a/doc/docs/id-id/doc/objects/with-statement.md b/doc/docs/id-id/doc/objects/with-statement.md
index b3dd520..e41060a 100644
--- a/doc/docs/id-id/doc/objects/with-statement.md
+++ b/doc/docs/id-id/doc/objects/with-statement.md
@@ -162,14 +162,14 @@ with tb
162 162
163```yuescript 163```yuescript
164with? obj 164with? obj
165 print obj.name 165 print .name
166``` 166```
167 167
168<YueDisplay> 168<YueDisplay>
169 169
170```yue 170```yue
171with? obj 171with? obj
172 print obj.name 172 print .name
173``` 173```
174 174
175</YueDisplay> 175</YueDisplay>
diff --git a/doc/docs/pt-br/doc/advanced/do.md b/doc/docs/pt-br/doc/advanced/do.md
index aaf2c69..aaa9b0c 100644
--- a/doc/docs/pt-br/doc/advanced/do.md
+++ b/doc/docs/pt-br/doc/advanced/do.md
@@ -20,27 +20,7 @@ print var -- nil aqui
20 20
21</YueDisplay> 21</YueDisplay>
22 22
23O **do** do YueScript também pode ser usado como expressão. Permitindo combinar múltiplas linhas em uma. O resultado da expressão do é a última instrução em seu corpo. Expressões `do` suportam usar `break` para interromper o fluxo de execução e retornar múltiplos valores antecipadamente. 23O **do** do YueScript também pode ser usado como expressão. Permitindo combinar múltiplas linhas em uma. O resultado da expressão do é a última instrução em seu corpo.
24
25```yuescript
26status, value = do
27 n = 12
28 if n > 10
29 break "large", n
30 break "small", n
31```
32
33<YueDisplay>
34
35```yue
36status, value = do
37 n = 12
38 if n > 10
39 break "large", n
40 break "small", n
41```
42
43</YueDisplay>
44 24
45```yuescript 25```yuescript
46counter = do 26counter = do
@@ -87,3 +67,25 @@ tbl = {
87``` 67```
88 68
89</YueDisplay> 69</YueDisplay>
70
71Expressões `do` suportam usar `break` para interromper o fluxo de execução e retornar múltiplos valores antecipadamente.
72
73```yuescript
74status, value = do
75 n = 12
76 if n > 10
77 break "large", n
78 break "small", n
79```
80
81<YueDisplay>
82
83```yue
84status, value = do
85 n = 12
86 if n > 10
87 break "large", n
88 break "small", n
89```
90
91</YueDisplay>
diff --git a/doc/docs/pt-br/doc/objects/with-statement.md b/doc/docs/pt-br/doc/objects/with-statement.md
index 38efee7..06986a4 100644
--- a/doc/docs/pt-br/doc/objects/with-statement.md
+++ b/doc/docs/pt-br/doc/objects/with-statement.md
@@ -162,14 +162,14 @@ with tb
162 162
163```yuescript 163```yuescript
164with? obj 164with? obj
165 print obj.name 165 print .name
166``` 166```
167 167
168<YueDisplay> 168<YueDisplay>
169 169
170```yue 170```yue
171with? obj 171with? obj
172 print obj.name 172 print .name
173``` 173```
174 174
175</YueDisplay> 175</YueDisplay>
diff --git a/doc/docs/zh/doc/advanced/do.md b/doc/docs/zh/doc/advanced/do.md
index b3f61af..2c149d2 100644
--- a/doc/docs/zh/doc/advanced/do.md
+++ b/doc/docs/zh/doc/advanced/do.md
@@ -20,27 +20,7 @@ print var -- 这里是nil
20 20
21</YueDisplay> 21</YueDisplay>
22 22
23&emsp;&emsp;月之脚本的 **do** 也可以用作表达式。允许你将多行代码的处理合并为一个表达式,并将 do 语句代码块的最后一个语句作为表达式返回的结果。`do` 表达式支持通过 `break` 打断执行流并提前返回多个值。 23&emsp;&emsp;月之脚本的 **do** 也可以用作表达式。允许你将多行代码的处理合并为一个表达式,并将 do 语句代码块的最后一个语句作为表达式返回的结果。
24
25```yuescript
26status, value = do
27 n = 12
28 if n > 10
29 break "large", n
30 break "small", n
31```
32
33<YueDisplay>
34
35```yue
36status, value = do
37 n = 12
38 if n > 10
39 break "large", n
40 break "small", n
41```
42
43</YueDisplay>
44 24
45```yuescript 25```yuescript
46counter = do 26counter = do
@@ -87,3 +67,25 @@ tbl = {
87``` 67```
88 68
89</YueDisplay> 69</YueDisplay>
70
71&emsp;&emsp;`do` 表达式支持通过 `break` 打断执行流并提前返回多个值。
72
73```yuescript
74status, value = do
75 n = 12
76 if n > 10
77 break "large", n
78 break "small", n
79```
80
81<YueDisplay>
82
83```yue
84status, value = do
85 n = 12
86 if n > 10
87 break "large", n
88 break "small", n
89```
90
91</YueDisplay>
diff --git a/doc/docs/zh/doc/objects/with-statement.md b/doc/docs/zh/doc/objects/with-statement.md
index 338e2cc..2b5b80a 100644
--- a/doc/docs/zh/doc/objects/with-statement.md
+++ b/doc/docs/zh/doc/objects/with-statement.md
@@ -162,14 +162,14 @@ with tb
162 162
163```yuescript 163```yuescript
164with? obj 164with? obj
165 print obj.name 165 print .name
166``` 166```
167 167
168<YueDisplay> 168<YueDisplay>
169 169
170```yue 170```yue
171with? obj 171with? obj
172 print obj.name 172 print .name
173``` 173```
174 174
175</YueDisplay> 175</YueDisplay>
diff --git a/doc/yue-de.md b/doc/yue-de.md
index 94bfd4b..0db2bfe 100644
--- a/doc/yue-de.md
+++ b/doc/yue-de.md
@@ -15,16 +15,6 @@ do
15print var -- nil hier 15print var -- nil hier
16``` 16```
17 17
18YueScripts **do** kann auch als Ausdruck verwendet werden. So kannst du mehrere Zeilen in einem Ausdruck kombinieren. Das Ergebnis des `do`-Ausdrucks ist die letzte Anweisung im Block. `do`-Ausdrücke unterstützen die Verwendung von `break`, um den Kontrollfluss zu unterbrechen und mehrere Rückgabewerte vorzeitig zurückzugeben.
19
20```yuescript
21status, value = do
22 n = 12
23 if n > 10
24 break "large", n
25 break "small", n
26```
27
28```yuescript 18```yuescript
29counter = do 19counter = do
30 i = 0 20 i = 0
@@ -44,6 +34,16 @@ tbl = {
44} 34}
45``` 35```
46 36
37YueScripts **do** kann auch als Ausdruck verwendet werden. So kannst du mehrere Zeilen in einem Ausdruck kombinieren. Das Ergebnis des `do`-Ausdrucks ist die letzte Anweisung im Block. `do`-Ausdrücke unterstützen die Verwendung von `break`, um den Kontrollfluss zu unterbrechen und mehrere Rückgabewerte vorzeitig zurückzugeben.
38
39```yuescript
40status, value = do
41 n = 12
42 if n > 10
43 break "large", n
44 break "small", n
45```
46
47# Line-Decorators 47# Line-Decorators
48 48
49Zur Vereinfachung können `for`-Schleifen und `if`-Anweisungen auf einzelne Anweisungen am Zeilenende angewendet werden: 49Zur Vereinfachung können `for`-Schleifen und `if`-Anweisungen auf einzelne Anweisungen am Zeilenende angewendet werden:
@@ -868,7 +868,7 @@ with tb
868 868
869```yuescript 869```yuescript
870with? obj 870with? obj
871 print obj.name 871 print .name
872``` 872```
873 873
874# Zuweisung 874# Zuweisung
diff --git a/doc/yue-en.md b/doc/yue-en.md
index 764bc1a..a82ae9a 100644
--- a/doc/yue-en.md
+++ b/doc/yue-en.md
@@ -15,18 +15,6 @@ do
15print var -- nil here 15print var -- nil here
16``` 16```
17 17
18YueScript's **do** can also be used an expression . Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body.
19
20`do` expressions also support using `break` to interrupt control flow and return multiple values early:
21
22```yuescript
23status, value = do
24 n = 12
25 if n > 10
26 break "large", n
27 break "small", n
28```
29
30```yuescript 18```yuescript
31counter = do 19counter = do
32 i = 0 20 i = 0
@@ -46,6 +34,18 @@ tbl = {
46} 34}
47``` 35```
48 36
37YueScript's **do** can also be used an expression . Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body.
38
39`do` expressions also support using `break` to interrupt control flow and return multiple values early:
40
41```yuescript
42status, value = do
43 n = 12
44 if n > 10
45 break "large", n
46 break "small", n
47```
48
49# Line Decorators 49# Line Decorators
50 50
51For convenience, the for loop and if statement can be applied to single statements at the end of the line: 51For convenience, the for loop and if statement can be applied to single statements at the end of the line:
@@ -870,7 +870,7 @@ with tb
870 870
871```yuescript 871```yuescript
872with? obj 872with? obj
873 print obj.name 873 print .name
874``` 874```
875 875
876# Assignment 876# Assignment
diff --git a/doc/yue-id-id.md b/doc/yue-id-id.md
index 200438e..d753e20 100644
--- a/doc/yue-id-id.md
+++ b/doc/yue-id-id.md
@@ -15,16 +15,6 @@ do
15print var -- nil di sini 15print var -- nil di sini
16``` 16```
17 17
18`do` di YueScript juga bisa digunakan sebagai ekspresi, memungkinkan Anda menggabungkan beberapa baris menjadi satu. Hasil ekspresi `do` adalah pernyataan terakhir di badannya. Ekspresi `do` mendukung penggunaan `break` untuk memutus alur eksekusi dan mengembalikan banyak nilai lebih awal.
19
20```yuescript
21status, value = do
22 n = 12
23 if n > 10
24 break "large", n
25 break "small", n
26```
27
28```yuescript 18```yuescript
29counter = do 19counter = do
30 i = 0 20 i = 0
@@ -44,6 +34,16 @@ tbl = {
44} 34}
45``` 35```
46 36
37`do` di YueScript juga bisa digunakan sebagai ekspresi, memungkinkan Anda menggabungkan beberapa baris menjadi satu. Hasil ekspresi `do` adalah pernyataan terakhir di badannya. Ekspresi `do` mendukung penggunaan `break` untuk memutus alur eksekusi dan mengembalikan banyak nilai lebih awal.
38
39```yuescript
40status, value = do
41 n = 12
42 if n > 10
43 break "large", n
44 break "small", n
45```
46
47# Dekorator Baris 47# Dekorator Baris
48 48
49Untuk kemudahan, loop for dan pernyataan if dapat diterapkan pada pernyataan tunggal di akhir baris: 49Untuk kemudahan, loop for dan pernyataan if dapat diterapkan pada pernyataan tunggal di akhir baris:
@@ -868,7 +868,7 @@ with tb
868 868
869```yuescript 869```yuescript
870with? obj 870with? obj
871 print obj.name 871 print .name
872``` 872```
873 873
874# Penugasan 874# Penugasan
diff --git a/doc/yue-pt-br.md b/doc/yue-pt-br.md
index dac3aad..334e5fc 100644
--- a/doc/yue-pt-br.md
+++ b/doc/yue-pt-br.md
@@ -15,16 +15,6 @@ do
15print var -- nil aqui 15print var -- nil aqui
16``` 16```
17 17
18O **do** do YueScript também pode ser usado como expressão. Permitindo combinar múltiplas linhas em uma. O resultado da expressão do é a última instrução em seu corpo. Expressões `do` suportam usar `break` para interromper o fluxo de execução e retornar múltiplos valores antecipadamente.
19
20```yuescript
21status, value = do
22 n = 12
23 if n > 10
24 break "large", n
25 break "small", n
26```
27
28```yuescript 18```yuescript
29counter = do 19counter = do
30 i = 0 20 i = 0
@@ -44,6 +34,16 @@ tbl = {
44} 34}
45``` 35```
46 36
37O **do** do YueScript também pode ser usado como expressão. Permitindo combinar múltiplas linhas em uma. O resultado da expressão do é a última instrução em seu corpo. Expressões `do` suportam usar `break` para interromper o fluxo de execução e retornar múltiplos valores antecipadamente.
38
39```yuescript
40status, value = do
41 n = 12
42 if n > 10
43 break "large", n
44 break "small", n
45```
46
47# Decoradores de linha 47# Decoradores de linha
48 48
49Por conveniência, o loop for e a instrução if podem ser aplicados a instruções únicas no final da linha: 49Por conveniência, o loop for e a instrução if podem ser aplicados a instruções únicas no final da linha:
@@ -868,7 +868,7 @@ with tb
868 868
869```yuescript 869```yuescript
870with? obj 870with? obj
871 print obj.name 871 print .name
872``` 872```
873 873
874# Atribuição 874# Atribuição
diff --git a/doc/yue-zh.md b/doc/yue-zh.md
index d8b5346..4585f53 100644
--- a/doc/yue-zh.md
+++ b/doc/yue-zh.md
@@ -15,16 +15,6 @@ do
15print var -- 这里是nil 15print var -- 这里是nil
16``` 16```
17 17
18&emsp;&emsp;月之脚本的 **do** 也可以用作表达式。允许你将多行代码的处理合并为一个表达式,并将 do 语句代码块的最后一个语句作为表达式返回的结果。`do` 表达式支持通过 `break` 打断执行流并提前返回多个值。
19
20```yuescript
21status, value = do
22 n = 12
23 if n > 10
24 break "large", n
25 break "small", n
26```
27
28```yuescript 18```yuescript
29counter = do 19counter = do
30 i = 0 20 i = 0
@@ -44,6 +34,16 @@ tbl = {
44} 34}
45``` 35```
46 36
37&emsp;&emsp;月之脚本的 **do** 也可以用作表达式。允许你将多行代码的处理合并为一个表达式,并将 do 语句代码块的最后一个语句作为表达式返回的结果。`do` 表达式支持通过 `break` 打断执行流并提前返回多个值。
38
39```yuescript
40status, value = do
41 n = 12
42 if n > 10
43 break "large", n
44 break "small", n
45```
46
47# 代码行修饰 47# 代码行修饰
48 48
49&emsp;&emsp;为了方便编写代码,循环语句和 if 语句可以应用于单行代码语句的末尾: 49&emsp;&emsp;为了方便编写代码,循环语句和 if 语句可以应用于单行代码语句的末尾:
@@ -862,7 +862,7 @@ with tb
862 862
863```yuescript 863```yuescript
864with? obj 864with? obj
865 print obj.name 865 print .name
866``` 866```
867 867
868# 赋值 868# 赋值
diff --git a/spec/outputs/codes_from_doc_de.lua b/spec/outputs/codes_from_doc_de.lua
index 70783f1..6bb5f2a 100644
--- a/spec/outputs/codes_from_doc_de.lua
+++ b/spec/outputs/codes_from_doc_de.lua
@@ -3,18 +3,6 @@ do
3 print(var) 3 print(var)
4end 4end
5print(var) 5print(var)
6local status, value
7do
8 repeat
9 local n = 12
10 if n > 10 then
11 status, value = "large", n
12 break
13 end
14 status, value = "small", n
15 break
16 until true
17end
18local counter 6local counter
19do 7do
20 local i = 0 8 local i = 0
@@ -31,11 +19,6 @@ local tbl = {
31 return 1234 19 return 1234
32 end)() 20 end)()
33} 21}
34do
35 local var = "hallo"
36 print(var)
37end
38print(var)
39local status, value 22local status, value
40do 23do
41 repeat 24 repeat
@@ -48,6 +31,11 @@ do
48 break 31 break
49 until true 32 until true
50end 33end
34do
35 local var = "hallo"
36 print(var)
37end
38print(var)
51local counter 39local counter
52do 40do
53 local i = 0 41 local i = 0
@@ -64,6 +52,18 @@ local tbl = {
64 return 1234 52 return 1234
65 end)() 53 end)()
66} 54}
55local status, value
56do
57 repeat
58 local n = 12
59 if n > 10 then
60 status, value = "large", n
61 break
62 end
63 status, value = "small", n
64 break
65 until true
66end
67if name == "Rob" then 67if name == "Rob" then
68 print("Hallo Welt") 68 print("Hallo Welt")
69end 69end
@@ -2204,7 +2204,7 @@ end
2204_with_0[#_with_0 + 1] = "abc" 2204_with_0[#_with_0 + 1] = "abc"
2205local _with_0 = obj 2205local _with_0 = obj
2206if _with_0 ~= nil then 2206if _with_0 ~= nil then
2207 print(obj.name) 2207 print(_with_0.name)
2208end 2208end
2209local _with_0 = Person() 2209local _with_0 = Person()
2210_with_0.name = "Oswald" 2210_with_0.name = "Oswald"
@@ -2262,7 +2262,7 @@ end
2262_with_0[#_with_0 + 1] = "abc" 2262_with_0[#_with_0 + 1] = "abc"
2263local _with_0 = obj 2263local _with_0 = obj
2264if _with_0 ~= nil then 2264if _with_0 ~= nil then
2265 print(obj.name) 2265 print(_with_0.name)
2266end 2266end
2267local hello = "world" 2267local hello = "world"
2268local a, b, c = 1, 2, 3 2268local a, b, c = 1, 2, 3
diff --git a/spec/outputs/codes_from_doc_en.lua b/spec/outputs/codes_from_doc_en.lua
index 4cfcaee..ec50f7e 100644
--- a/spec/outputs/codes_from_doc_en.lua
+++ b/spec/outputs/codes_from_doc_en.lua
@@ -3,18 +3,6 @@ do
3 print(var) 3 print(var)
4end 4end
5print(var) 5print(var)
6local status, value
7do
8 repeat
9 local n = 12
10 if n > 10 then
11 status, value = "large", n
12 break
13 end
14 status, value = "small", n
15 break
16 until true
17end
18local counter 6local counter
19do 7do
20 local i = 0 8 local i = 0
@@ -31,11 +19,6 @@ local tbl = {
31 return 1234 19 return 1234
32 end)() 20 end)()
33} 21}
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
39local status, value 22local status, value
40do 23do
41 repeat 24 repeat
@@ -48,6 +31,11 @@ do
48 break 31 break
49 until true 32 until true
50end 33end
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
51local counter 39local counter
52do 40do
53 local i = 0 41 local i = 0
@@ -64,6 +52,18 @@ local tbl = {
64 return 1234 52 return 1234
65 end)() 53 end)()
66} 54}
55local status, value
56do
57 repeat
58 local n = 12
59 if n > 10 then
60 status, value = "large", n
61 break
62 end
63 status, value = "small", n
64 break
65 until true
66end
67if name == "Rob" then 67if name == "Rob" then
68 print("hello world") 68 print("hello world")
69end 69end
@@ -2204,7 +2204,7 @@ end
2204_with_0[#_with_0 + 1] = "abc" 2204_with_0[#_with_0 + 1] = "abc"
2205local _with_0 = obj 2205local _with_0 = obj
2206if _with_0 ~= nil then 2206if _with_0 ~= nil then
2207 print(obj.name) 2207 print(_with_0.name)
2208end 2208end
2209local _with_0 = Person() 2209local _with_0 = Person()
2210_with_0.name = "Oswald" 2210_with_0.name = "Oswald"
@@ -2262,7 +2262,7 @@ end
2262_with_0[#_with_0 + 1] = "abc" 2262_with_0[#_with_0 + 1] = "abc"
2263local _with_0 = obj 2263local _with_0 = obj
2264if _with_0 ~= nil then 2264if _with_0 ~= nil then
2265 print(obj.name) 2265 print(_with_0.name)
2266end 2266end
2267local hello = "world" 2267local hello = "world"
2268local a, b, c = 1, 2, 3 2268local a, b, c = 1, 2, 3
diff --git a/spec/outputs/codes_from_doc_id-id.lua b/spec/outputs/codes_from_doc_id-id.lua
index a960fd6..c4795ac 100644
--- a/spec/outputs/codes_from_doc_id-id.lua
+++ b/spec/outputs/codes_from_doc_id-id.lua
@@ -3,18 +3,6 @@ do
3 print(var) 3 print(var)
4end 4end
5print(var) 5print(var)
6local status, value
7do
8 repeat
9 local n = 12
10 if n > 10 then
11 status, value = "large", n
12 break
13 end
14 status, value = "small", n
15 break
16 until true
17end
18local counter 6local counter
19do 7do
20 local i = 0 8 local i = 0
@@ -31,11 +19,6 @@ local tbl = {
31 return 1234 19 return 1234
32 end)() 20 end)()
33} 21}
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
39local status, value 22local status, value
40do 23do
41 repeat 24 repeat
@@ -48,6 +31,11 @@ do
48 break 31 break
49 until true 32 until true
50end 33end
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
51local counter 39local counter
52do 40do
53 local i = 0 41 local i = 0
@@ -64,6 +52,18 @@ local tbl = {
64 return 1234 52 return 1234
65 end)() 53 end)()
66} 54}
55local status, value
56do
57 repeat
58 local n = 12
59 if n > 10 then
60 status, value = "large", n
61 break
62 end
63 status, value = "small", n
64 break
65 until true
66end
67if name == "Rob" then 67if name == "Rob" then
68 print("hello world") 68 print("hello world")
69end 69end
@@ -2204,7 +2204,7 @@ end
2204_with_0[#_with_0 + 1] = "abc" 2204_with_0[#_with_0 + 1] = "abc"
2205local _with_0 = obj 2205local _with_0 = obj
2206if _with_0 ~= nil then 2206if _with_0 ~= nil then
2207 print(obj.name) 2207 print(_with_0.name)
2208end 2208end
2209local _with_0 = Person() 2209local _with_0 = Person()
2210_with_0.name = "Oswald" 2210_with_0.name = "Oswald"
@@ -2262,7 +2262,7 @@ end
2262_with_0[#_with_0 + 1] = "abc" 2262_with_0[#_with_0 + 1] = "abc"
2263local _with_0 = obj 2263local _with_0 = obj
2264if _with_0 ~= nil then 2264if _with_0 ~= nil then
2265 print(obj.name) 2265 print(_with_0.name)
2266end 2266end
2267local hello = "world" 2267local hello = "world"
2268local a, b, c = 1, 2, 3 2268local a, b, c = 1, 2, 3
diff --git a/spec/outputs/codes_from_doc_pt-br.lua b/spec/outputs/codes_from_doc_pt-br.lua
index d047596..927d05b 100644
--- a/spec/outputs/codes_from_doc_pt-br.lua
+++ b/spec/outputs/codes_from_doc_pt-br.lua
@@ -3,18 +3,6 @@ do
3 print(var) 3 print(var)
4end 4end
5print(var) 5print(var)
6local status, value
7do
8 repeat
9 local n = 12
10 if n > 10 then
11 status, value = "large", n
12 break
13 end
14 status, value = "small", n
15 break
16 until true
17end
18local counter 6local counter
19do 7do
20 local i = 0 8 local i = 0
@@ -31,11 +19,6 @@ local tbl = {
31 return 1234 19 return 1234
32 end)() 20 end)()
33} 21}
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
39local status, value 22local status, value
40do 23do
41 repeat 24 repeat
@@ -48,6 +31,11 @@ do
48 break 31 break
49 until true 32 until true
50end 33end
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
51local counter 39local counter
52do 40do
53 local i = 0 41 local i = 0
@@ -64,6 +52,18 @@ local tbl = {
64 return 1234 52 return 1234
65 end)() 53 end)()
66} 54}
55local status, value
56do
57 repeat
58 local n = 12
59 if n > 10 then
60 status, value = "large", n
61 break
62 end
63 status, value = "small", n
64 break
65 until true
66end
67if name == "Rob" then 67if name == "Rob" then
68 print("hello world") 68 print("hello world")
69end 69end
@@ -2204,7 +2204,7 @@ end
2204_with_0[#_with_0 + 1] = "abc" 2204_with_0[#_with_0 + 1] = "abc"
2205local _with_0 = obj 2205local _with_0 = obj
2206if _with_0 ~= nil then 2206if _with_0 ~= nil then
2207 print(obj.name) 2207 print(_with_0.name)
2208end 2208end
2209local _with_0 = Person() 2209local _with_0 = Person()
2210_with_0.name = "Oswald" 2210_with_0.name = "Oswald"
@@ -2262,7 +2262,7 @@ end
2262_with_0[#_with_0 + 1] = "abc" 2262_with_0[#_with_0 + 1] = "abc"
2263local _with_0 = obj 2263local _with_0 = obj
2264if _with_0 ~= nil then 2264if _with_0 ~= nil then
2265 print(obj.name) 2265 print(_with_0.name)
2266end 2266end
2267local hello = "world" 2267local hello = "world"
2268local a, b, c = 1, 2, 3 2268local a, b, c = 1, 2, 3
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua
index 2065307..5849e00 100644
--- a/spec/outputs/codes_from_doc_zh.lua
+++ b/spec/outputs/codes_from_doc_zh.lua
@@ -3,18 +3,6 @@ do
3 print(var) 3 print(var)
4end 4end
5print(var) 5print(var)
6local status, value
7do
8 repeat
9 local n = 12
10 if n > 10 then
11 status, value = "large", n
12 break
13 end
14 status, value = "small", n
15 break
16 until true
17end
18local counter 6local counter
19do 7do
20 local i = 0 8 local i = 0
@@ -31,11 +19,6 @@ local tbl = {
31 return 1234 19 return 1234
32 end)() 20 end)()
33} 21}
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
39local status, value 22local status, value
40do 23do
41 repeat 24 repeat
@@ -48,6 +31,11 @@ do
48 break 31 break
49 until true 32 until true
50end 33end
34do
35 local var = "hello"
36 print(var)
37end
38print(var)
51local counter 39local counter
52do 40do
53 local i = 0 41 local i = 0
@@ -64,6 +52,18 @@ local tbl = {
64 return 1234 52 return 1234
65 end)() 53 end)()
66} 54}
55local status, value
56do
57 repeat
58 local n = 12
59 if n > 10 then
60 status, value = "large", n
61 break
62 end
63 status, value = "small", n
64 break
65 until true
66end
67if name == "Rob" then 67if name == "Rob" then
68 print("你好,世界") 68 print("你好,世界")
69end 69end
@@ -2204,7 +2204,7 @@ end
2204_with_0[#_with_0 + 1] = "abc" 2204_with_0[#_with_0 + 1] = "abc"
2205local _with_0 = obj 2205local _with_0 = obj
2206if _with_0 ~= nil then 2206if _with_0 ~= nil then
2207 print(obj.name) 2207 print(_with_0.name)
2208end 2208end
2209local _with_0 = Person() 2209local _with_0 = Person()
2210_with_0.name = "Oswald" 2210_with_0.name = "Oswald"
@@ -2262,7 +2262,7 @@ end
2262_with_0[#_with_0 + 1] = "abc" 2262_with_0[#_with_0 + 1] = "abc"
2263local _with_0 = obj 2263local _with_0 = obj
2264if _with_0 ~= nil then 2264if _with_0 ~= nil then
2265 print(obj.name) 2265 print(_with_0.name)
2266end 2266end
2267local hello = "world" 2267local hello = "world"
2268local a, b, c = 1, 2, 3 2268local a, b, c = 1, 2, 3