aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/codes_from_doc.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.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.lua')
-rw-r--r--spec/outputs/codes_from_doc.lua60
1 files changed, 38 insertions, 22 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua
index 84dfc4e..1df7cef 100644
--- a/spec/outputs/codes_from_doc.lua
+++ b/spec/outputs/codes_from_doc.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
@@ -2928,17 +2936,6 @@ local tb = {
2928 } 2936 }
2929} 2937}
2930do 2938do
2931 local print = print
2932 local math = math
2933 print("hello")
2934 math.random(3)
2935end
2936do
2937 local print = print
2938 print(FLAG)
2939 FLAG = 123
2940end
2941do
2942 local insert, concat = table.insert, table.concat 2939 local insert, concat = table.insert, table.concat
2943 local C, Ct, Cmt 2940 local C, Ct, Cmt
2944 do 2941 do
@@ -2971,6 +2968,25 @@ do
2971 local _obj_0 = require("export") 2968 local _obj_0 = require("export")
2972 one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1] 2969 one, two, ch = _obj_0[1], _obj_0[2], _obj_0.Something.umm[1]
2973end 2970end
2971do
2972 local tostring <const> = tostring
2973 local concat <const> = table.concat
2974 print(concat({
2975 "a",
2976 tostring(1)
2977 }))
2978end
2979do
2980 local print <const> = print
2981 local math <const> = math
2982 print("hello")
2983 math.random(3)
2984end
2985do
2986 local print <const> = print
2987 print(FLAG)
2988 FLAG = 123
2989end
2974local _module_0 = { } 2990local _module_0 = { }
2975local a, b, c = 1, 2, 3 2991local a, b, c = 1, 2, 3
2976_module_0["a"], _module_0["b"], _module_0["c"] = a, b, c 2992_module_0["a"], _module_0["b"], _module_0["c"] = a, b, c