aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/codes_from_doc_en.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-02-24 16:02:05 +0800
committerLi Jin <dragon-fly@qq.com>2026-02-24 16:02:05 +0800
commitafc2eba9d73a43d2f3080cf12be4ffe977a79414 (patch)
tree7d07be9dd9150d1eaa08caddcf3e7f88acb5396a /spec/outputs/codes_from_doc_en.lua
parent0ccf4408271c8a0d147e3cf25689810862e8c1db (diff)
downloadyuescript-afc2eba9d73a43d2f3080cf12be4ffe977a79414.tar.gz
yuescript-afc2eba9d73a43d2f3080cf12be4ffe977a79414.tar.bz2
yuescript-afc2eba9d73a43d2f3080cf12be4ffe977a79414.zip
Updated docs. [skip CI]
Diffstat (limited to 'spec/outputs/codes_from_doc_en.lua')
-rw-r--r--spec/outputs/codes_from_doc_en.lua38
1 files changed, 19 insertions, 19 deletions
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