aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/codes_from_doc_zh.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-15 17:54:59 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-15 17:54:59 +0800
commitafb046316a15a2c3702b1f056456b58e9356e693 (patch)
treec4820522be5c92948553673dad42c1734d30689f /spec/outputs/codes_from_doc_zh.lua
parent873aced12cf65e633c95358f89a1d5ec37b81d00 (diff)
downloadyuescript-afb046316a15a2c3702b1f056456b58e9356e693.tar.gz
yuescript-afb046316a15a2c3702b1f056456b58e9356e693.tar.bz2
yuescript-afb046316a15a2c3702b1f056456b58e9356e693.zip
Added const attributes.
Diffstat (limited to 'spec/outputs/codes_from_doc_zh.lua')
-rw-r--r--spec/outputs/codes_from_doc_zh.lua60
1 files changed, 38 insertions, 22 deletions
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua
index d4e8b6a..b407895 100644
--- a/spec/outputs/codes_from_doc_zh.lua
+++ b/spec/outputs/codes_from_doc_zh.lua
@@ -409,17 +409,6 @@ local tb = {
409 } 409 }
410} 410}
411do 411do
412 local print = print
413 local math = math
414 print("hello")
415 math.random(3)
416end
417do
418 local print = print
419 print(FLAG)
420 FLAG = 123
421end
422do
423 local insert, concat = table.insert, table.concat 412 local insert, concat = table.insert, table.concat
424 local C, Ct, Cmt 413 local C, Ct, Cmt
425 do 414 do
@@ -452,6 +441,25 @@ do
452 local _obj_0 = require("export") 441 local _obj_0 = require("export")
453 one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1] 442 one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1]
454end 443end
444do
445 local tostring <const> = tostring
446 local concat <const> = table.concat
447 print(concat({
448 "a",
449 tostring(1)
450 }))
451end
452do
453 local print <const> = print
454 local math <const> = math
455 print("hello")
456 math.random(3)
457end
458do
459 local print <const> = print
460 print(FLAG)
461 FLAG = 123
462end
455local _module_0 = { } 463local _module_0 = { }
456local a, b, c = 1, 2, 3 464local a, b, c = 1, 2, 3
457_module_0["a"], _module_0["b"], _module_0["c"] = a, b, c 465_module_0["a"], _module_0["b"], _module_0["c"] = a, b, c
@@ -2922,17 +2930,6 @@ local tb = {
2922 } 2930 }
2923} 2931}
2924do 2932do
2925 local print = print
2926 local math = math
2927 print("hello")
2928 math.random(3)
2929end
2930do
2931 local print = print
2932 print(FLAG)
2933 FLAG = 123
2934end
2935do
2936 local insert, concat = table.insert, table.concat 2933 local insert, concat = table.insert, table.concat
2937 local C, Ct, Cmt 2934 local C, Ct, Cmt
2938 do 2935 do
@@ -2965,6 +2962,25 @@ do
2965 local _obj_0 = require("export") 2962 local _obj_0 = require("export")
2966 one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1] 2963 one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1]
2967end 2964end
2965do
2966 local tostring <const> = tostring
2967 local concat <const> = table.concat
2968 print(concat({
2969 "a",
2970 tostring(1)
2971 }))
2972end
2973do
2974 local print <const> = print
2975 local math <const> = math
2976 print("hello")
2977 math.random(3)
2978end
2979do
2980 local print <const> = print
2981 print(FLAG)
2982 FLAG = 123
2983end
2968local _module_0 = { } 2984local _module_0 = { }
2969local a, b, c = 1, 2, 3 2985local a, b, c = 1, 2, 3
2970_module_0["a"], _module_0["b"], _module_0["c"] = a, b, c 2986_module_0["a"], _module_0["b"], _module_0["c"] = a, b, c