aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/unicode
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2024-03-21 09:14:34 +0800
committerLi Jin <dragon-fly@qq.com>2024-03-21 09:14:34 +0800
commit4a3cc26c6dfd74e61c8b6480038d6a292ea86e47 (patch)
tree9554b94cfc15e4acee0c2e60b63af16f1b828207 /spec/outputs/unicode
parent80b65520da432843f0c63431a1867bd2620bc4ac (diff)
downloadyuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.tar.gz
yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.tar.bz2
yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.zip
remove redundant 'do' blocks in code generation.
Diffstat (limited to 'spec/outputs/unicode')
-rw-r--r--spec/outputs/unicode/ambiguous.lua40
-rw-r--r--spec/outputs/unicode/assign.lua86
-rw-r--r--spec/outputs/unicode/attrib.lua18
-rw-r--r--spec/outputs/unicode/backcall.lua24
-rw-r--r--spec/outputs/unicode/bubbling.lua16
-rw-r--r--spec/outputs/unicode/class.lua44
-rw-r--r--spec/outputs/unicode/cond.lua68
-rw-r--r--spec/outputs/unicode/destructure.lua136
-rw-r--r--spec/outputs/unicode/global.lua42
-rw-r--r--spec/outputs/unicode/import.lua18
-rw-r--r--spec/outputs/unicode/in_expression.lua6
-rw-r--r--spec/outputs/unicode/local.lua80
-rw-r--r--spec/outputs/unicode/loops.lua20
-rw-r--r--spec/outputs/unicode/macro.lua262
-rw-r--r--spec/outputs/unicode/metatable.lua22
-rw-r--r--spec/outputs/unicode/multiline_chain.lua16
-rw-r--r--spec/outputs/unicode/nil_coalescing.lua96
-rw-r--r--spec/outputs/unicode/stub.lua10
-rw-r--r--spec/outputs/unicode/switch.lua366
-rw-r--r--spec/outputs/unicode/syntax.lua14
-rw-r--r--spec/outputs/unicode/tables.lua8
-rw-r--r--spec/outputs/unicode/vararg.lua88
-rw-r--r--spec/outputs/unicode/with.lua182
23 files changed, 766 insertions, 896 deletions
diff --git a/spec/outputs/unicode/ambiguous.lua b/spec/outputs/unicode/ambiguous.lua
index 3783026..ac90016 100644
--- a/spec/outputs/unicode/ambiguous.lua
+++ b/spec/outputs/unicode/ambiguous.lua
@@ -13,11 +13,17 @@ _u53d8_u91cfa, _u53d8_u91cfb = _u53d8_u91cfc, _u53d8_u91cfd;
13(_u53d8_u91cfd(_u53d8_u91cfa))(_u53d8_u91cfc) 13(_u53d8_u91cfd(_u53d8_u91cfa))(_u53d8_u91cfc)
14for _u8ba1_u6570 = 1, 10 do 14for _u8ba1_u6570 = 1, 10 do
15 _u53d8_u91cfa = function() end 15 _u53d8_u91cfa = function() end
16 (_u6253_u5370)(1) 16 do
17 _u53d8_u91cfa = _u53d8_u91cff; 17 (_u6253_u5370)(1)
18 (_u6253_u5370)(2) 18 end
19 _u53d8_u91cfa = _u53d8_u91cff
20 do
21 (_u6253_u5370)(2)
22 end
19 if _u6761_u4ef6 then 23 if _u6761_u4ef6 then
20 (_u6253_u5370)(3) 24 do
25 (_u6253_u5370)(3)
26 end
21 end 27 end
22 ::_u8df3_u8f6c_u4f4d_u7f6e::; 28 ::_u8df3_u8f6c_u4f4d_u7f6e::;
23 (_u6253_u5370)(4) 29 (_u6253_u5370)(4)
@@ -40,7 +46,9 @@ do
40 end) 46 end)
41end 47end
42do 48do
43 _u6253_u5370(123) 49 do
50 _u6253_u5370(123)
51 end
44end 52end
45do 53do
46 _u51fd_u6570f({ 54 _u51fd_u6570f({
@@ -97,18 +105,16 @@ do
97 _u6570_u5b57_u6570_u7ec4 = _accum_0 105 _u6570_u5b57_u6570_u7ec4 = _accum_0
98 end 106 end
99 local _u5bf9_u8c61_u6570_u7ec4 107 local _u5bf9_u8c61_u6570_u7ec4
100 do 108 local _accum_0 = { }
101 local _accum_0 = { } 109 local _len_0 = 1
102 local _len_0 = 1 110 local _list_0 = _u7269_u4ef6_u6570_u7ec4
103 local _list_0 = _u7269_u4ef6_u6570_u7ec4 111 for _index_0 = 1, #_list_0 do
104 for _index_0 = 1, #_list_0 do 112 local _u7269_u4ef6 = _list_0[_index_0]
105 local _u7269_u4ef6 = _list_0[_index_0] 113 _accum_0[_len_0] = {
106 _accum_0[_len_0] = { 114 ["名称"] = _u7269_u4ef6
107 ["名称"] = _u7269_u4ef6 115 }
108 } 116 _len_0 = _len_0 + 1
109 _len_0 = _len_0 + 1
110 end
111 _u5bf9_u8c61_u6570_u7ec4 = _accum_0
112 end 117 end
118 _u5bf9_u8c61_u6570_u7ec4 = _accum_0
113end 119end
114return nil 120return nil
diff --git a/spec/outputs/unicode/assign.lua b/spec/outputs/unicode/assign.lua
index 290b248..16ece1a 100644
--- a/spec/outputs/unicode/assign.lua
+++ b/spec/outputs/unicode/assign.lua
@@ -52,18 +52,16 @@ return __u65e0_u6548_u53d8_u91cf(function()
52 setmetatable(a_u53d8_u91cf, _anon_func_0(_u6253_u5370)) 52 setmetatable(a_u53d8_u91cf, _anon_func_0(_u6253_u5370))
53 do 53 do
54 local _u5143_u7d20a, _u5143_u7d20b 54 local _u5143_u7d20a, _u5143_u7d20b
55 do 55 local _exp_0 = _u5bf9_u8c61c
56 local _exp_0 = _u5bf9_u8c61c 56 if "a" == _exp_0 then
57 if "a" == _exp_0 then 57 do
58 do 58 local _obj_0 = _u5b57_u5178
59 local _obj_0 = _u5b57_u5178 59 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2]
60 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2] 60 end
61 end 61 elseif "b" == _exp_0 then
62 elseif "b" == _exp_0 then 62 do
63 do 63 local _obj_0 = _u51fd_u6570()
64 local _obj_0 = _u51fd_u6570() 64 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2]
65 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2]
66 end
67 end 65 end
68 end 66 end
69 end 67 end
@@ -78,15 +76,11 @@ return __u65e0_u6548_u53d8_u91cf(function()
78 do 76 do
79 local _u53d8_u91cfa 77 local _u53d8_u91cfa
80 if x_u6761_u4ef6 then 78 if x_u6761_u4ef6 then
81 do 79 local _exp_0 = _u5bf9_u8c61y
82 local _exp_0 = _u5bf9_u8c61y 80 if 1 == _exp_0 then
83 if 1 == _exp_0 then 81 local _obj_0, _obj_1 = _u51fd_u6570()
84 do 82 _u53d8_u91cfb[#_u53d8_u91cfb + 1] = _obj_1
85 local _obj_0, _obj_1 = _u51fd_u6570() 83 _u53d8_u91cfa = _obj_0
86 _u53d8_u91cfb[#_u53d8_u91cfb + 1] = _obj_1
87 _u53d8_u91cfa = _obj_0
88 end
89 end
90 end 84 end
91 end 85 end
92 end 86 end
@@ -94,11 +88,9 @@ return __u65e0_u6548_u53d8_u91cf(function()
94 local _u53d8_u91cfa 88 local _u53d8_u91cfa
95 local _u5143_u7d20b 89 local _u5143_u7d20b
96 if x_u6761_u4ef6 then 90 if x_u6761_u4ef6 then
97 do 91 local _obj_0, _obj_1 = _u51fd_u6570()
98 local _obj_0, _obj_1 = _u51fd_u6570() 92 _u53d8_u91cfa = _obj_0
99 _u53d8_u91cfa = _obj_0 93 _u5143_u7d20b = _obj_1[1]
100 _u5143_u7d20b = _obj_1[1]
101 end
102 else 94 else
103 _u53d8_u91cfa = 123 95 _u53d8_u91cfa = 123
104 _u5143_u7d20b = _u8868[1] 96 _u5143_u7d20b = _u8868[1]
@@ -107,42 +99,28 @@ return __u65e0_u6548_u53d8_u91cf(function()
107 do 99 do
108 local _u53d8_u91cfa, _u5bf9_u8c61c 100 local _u53d8_u91cfa, _u5bf9_u8c61c
109 if _u6761_u4ef6x then 101 if _u6761_u4ef6x then
110 do 102 local _exp_0 = _u5bf9_u8c61y
111 local _exp_0 = _u5bf9_u8c61y 103 if 1 == _exp_0 then
112 if 1 == _exp_0 then 104 local _obj_0, _obj_1, _obj_2, _obj_3 = _u51fd_u6570()
113 do 105 local _obj_4 = _u6570_u7ec4b
114 local _obj_0, _obj_1, _obj_2, _obj_3 = _u51fd_u6570() 106 _obj_4[#_obj_4 + 1] = _obj_1
115 do 107 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = _obj_0, _obj_2, _obj_3
116 local _obj_4 = _u6570_u7ec4b
117 _obj_4[#_obj_4 + 1] = _obj_1
118 end
119 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = _obj_0, _obj_2, _obj_3
120 end
121 end
122 end 108 end
123 elseif _u6761_u4ef6x2 then 109 elseif _u6761_u4ef6x2 then
124 if _u6761_u4ef6y2 then 110 if _u6761_u4ef6y2 then
125 do 111 local _obj_0, _obj_1, _obj_2, _obj_3 = _u51fd_u65701()
126 local _obj_0, _obj_1, _obj_2, _obj_3 = _u51fd_u65701() 112 local _obj_4 = _u6570_u7ec4b
127 do 113 _obj_4[#_obj_4 + 1] = _obj_1
128 local _obj_4 = _u6570_u7ec4b 114 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = _obj_0, _obj_2, _obj_3
129 _obj_4[#_obj_4 + 1] = _obj_1
130 end
131 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = _obj_0, _obj_2, _obj_3
132 end
133 end 115 end
134 else 116 else
135 _u6253_u5370("hello") 117 _u6253_u5370("hello")
136 do 118 do
137 _u6253_u5370(123) 119 _u6253_u5370(123)
138 do 120 local _obj_0, _obj_1, _obj_2 = _u51fd_u65702()
139 local _obj_0, _obj_1, _obj_2 = _u51fd_u65702() 121 local _obj_3 = _u6570_u7ec4b
140 do 122 _obj_3[#_obj_3 + 1] = _obj_0
141 local _obj_3 = _u6570_u7ec4b 123 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = 1, _obj_1, _obj_2
142 _obj_3[#_obj_3 + 1] = _obj_0
143 end
144 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = 1, _obj_1, _obj_2
145 end
146 end 124 end
147 end 125 end
148 end 126 end
diff --git a/spec/outputs/unicode/attrib.lua b/spec/outputs/unicode/attrib.lua
index 0f60451..58ad4b2 100644
--- a/spec/outputs/unicode/attrib.lua
+++ b/spec/outputs/unicode/attrib.lua
@@ -14,20 +14,16 @@ end
14do 14do
15 local _u5e38_u91cfa <const> = _u51fd_u6570() 15 local _u5e38_u91cfa <const> = _u51fd_u6570()
16 local _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d 16 local _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d
17 do 17 local _obj_0, _obj_1 = _u51fd_u65701()
18 local _obj_0, _obj_1 = _u51fd_u65701() 18 _u5143_u7d20b, _u5143_u7d20c = _obj_0[1], _obj_0[2]
19 _u5143_u7d20b, _u5143_u7d20c = _obj_0[1], _obj_0[2] 19 _u5143_u7d20d = _obj_1[1]
20 _u5143_u7d20d = _obj_1[1]
21 end
22end 20end
23do 21do
24 local _u5e38_u91cfa, _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d 22 local _u5e38_u91cfa, _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d
25 do 23 local _obj_0, _obj_1, _obj_2 = _u51fd_u6570()
26 local _obj_0, _obj_1, _obj_2 = _u51fd_u6570() 24 _u5e38_u91cfa = _obj_0
27 _u5e38_u91cfa = _obj_0 25 _u5143_u7d20b, _u5143_u7d20c = _obj_1[1], _obj_1[2]
28 _u5143_u7d20b, _u5143_u7d20c = _obj_1[1], _obj_1[2] 26 _u5143_u7d20d = _obj_2[1]
29 _u5143_u7d20d = _obj_2[1]
30 end
31end 27end
32do 28do
33 local _u5173_u95ed_u53d8_u91cfv <close> = (function() 29 local _u5173_u95ed_u53d8_u91cfv <close> = (function()
diff --git a/spec/outputs/unicode/backcall.lua b/spec/outputs/unicode/backcall.lua
index 91dfdff..f4bd5a3 100644
--- a/spec/outputs/unicode/backcall.lua
+++ b/spec/outputs/unicode/backcall.lua
@@ -31,21 +31,19 @@ do
31 end)()) 31 end)())
32end 32end
33do 33do
34 do 34 local _obj_0 = _u7f51_u7edc
35 local _obj_0 = _u7f51_u7edc 35 if _obj_0 ~= nil then
36 if _obj_0 ~= nil then 36 _obj_0["获取"]("测试地址", function(_u6570_u636e)
37 _obj_0["获取"]("测试地址", function(_u6570_u636e) 37 local _call_0 = _u7f51_u9875_u4f53[".结果"]
38 local _call_0 = _u7f51_u9875_u4f53[".结果"] 38 _call_0["网页"](_call_0, _u6570_u636e)
39 _call_0["网页"](_call_0, _u6570_u636e) 39 return _u7f51_u7edc["请求"]("测试地址", _u6570_u636e, function(_u662f_u5426_u5904_u7406_u6210_u529f)
40 return _u7f51_u7edc["请求"]("测试地址", _u6570_u636e, function(_u662f_u5426_u5904_u7406_u6210_u529f) 40 local _call_1 = _u7f51_u9875_u4f53[".结果"]
41 local _call_1 = _u7f51_u9875_u4f53[".结果"] 41 _call_1["添加"](_call_1, _u662f_u5426_u5904_u7406_u6210_u679c)
42 _call_1["添加"](_call_1, _u662f_u5426_u5904_u7406_u6210_u679c) 42 return _u8bbe_u7f6e_u8d85_u65f6_u56de_u8c03(1000, function()
43 return _u8bbe_u7f6e_u8d85_u65f6_u56de_u8c03(1000, function() 43 return _u6253_u5370("完成")
44 return _u6253_u5370("完成")
45 end)
46 end) 44 end)
47 end) 45 end)
48 end 46 end)
49 end 47 end
50end 48end
51do 49do
diff --git a/spec/outputs/unicode/bubbling.lua b/spec/outputs/unicode/bubbling.lua
index cb8750d..55666ba 100644
--- a/spec/outputs/unicode/bubbling.lua
+++ b/spec/outputs/unicode/bubbling.lua
@@ -109,15 +109,13 @@ __u65e0_u6548_u53d8_u91cf = function(...)
109 _u6570_u7ec4a = _accum_0 109 _u6570_u7ec4a = _accum_0
110 end 110 end
111 local _u6570_u7ec4b 111 local _u6570_u7ec4b
112 do 112 local _accum_0 = { }
113 local _accum_0 = { } 113 local _len_0 = 1
114 local _len_0 = 1 114 for _u8ba1_u6570 = 1, 10 do
115 for _u8ba1_u6570 = 1, 10 do 115 _accum_0[_len_0] = function(...)
116 _accum_0[_len_0] = function(...) 116 return _u6253_u5370(...)
117 return _u6253_u5370(...)
118 end
119 _len_0 = _len_0 + 1
120 end 117 end
121 _u6570_u7ec4b = _accum_0 118 _len_0 = _len_0 + 1
122 end 119 end
120 _u6570_u7ec4b = _accum_0
123end 121end
diff --git a/spec/outputs/unicode/class.lua b/spec/outputs/unicode/class.lua
index 4d309e3..23fc8f4 100644
--- a/spec/outputs/unicode/class.lua
+++ b/spec/outputs/unicode/class.lua
@@ -497,30 +497,28 @@ _u6253_u5370("你好")
497local _u53d8_u91cfyyy 497local _u53d8_u91cfyyy
498_u53d8_u91cfyyy = function() 498_u53d8_u91cfyyy = function()
499 local _u9177 499 local _u9177
500 do 500 local _class_0
501 local _class_0 501 local _base_0 = { }
502 local _base_0 = { } 502 if _base_0.__index == nil then
503 if _base_0.__index == nil then 503 _base_0.__index = _base_0
504 _base_0.__index = _base_0
505 end
506 _class_0 = setmetatable({
507 __init = function() end,
508 __base = _base_0,
509 __name = "酷"
510 }, {
511 __index = _base_0,
512 __call = function(cls, ...)
513 local _self_0 = setmetatable({ }, _base_0)
514 cls.__init(_self_0, ...)
515 return _self_0
516 end
517 })
518 _base_0.__class = _class_0
519 local self = _class_0;
520 _ = nil
521 _u9177 = _class_0
522 return _class_0
523 end 504 end
505 _class_0 = setmetatable({
506 __init = function() end,
507 __base = _base_0,
508 __name = "酷"
509 }, {
510 __index = _base_0,
511 __call = function(cls, ...)
512 local _self_0 = setmetatable({ }, _base_0)
513 cls.__init(_self_0, ...)
514 return _self_0
515 end
516 })
517 _base_0.__class = _class_0
518 local self = _class_0;
519 _ = nil
520 _u9177 = _class_0
521 return _class_0
524end 522end
525do 523do
526 local _class_0 524 local _class_0
diff --git a/spec/outputs/unicode/cond.lua b/spec/outputs/unicode/cond.lua
index ed5d274..2b5af8a 100644
--- a/spec/outputs/unicode/cond.lua
+++ b/spec/outputs/unicode/cond.lua
@@ -113,19 +113,15 @@ local z_u53d8_u91cf = false
113if false then 113if false then
114 __u65e0_u6548_u53d8_u91cf = _u4e00 114 __u65e0_u6548_u53d8_u91cf = _u4e00
115else 115else
116 do 116 local _u6761_u4ef6x = true
117 local _u6761_u4ef6x = true 117 if _u6761_u4ef6x then
118 if _u6761_u4ef6x then 118 __u65e0_u6548_u53d8_u91cf = _u4e8c
119 __u65e0_u6548_u53d8_u91cf = _u4e8c 119 else
120 local _u6761_u4ef6z = true
121 if _u6761_u4ef6z then
122 __u65e0_u6548_u53d8_u91cf = _u4e09
120 else 123 else
121 do 124 __u65e0_u6548_u53d8_u91cf = _u56db
122 local _u6761_u4ef6z = true
123 if _u6761_u4ef6z then
124 __u65e0_u6548_u53d8_u91cf = _u4e09
125 else
126 __u65e0_u6548_u53d8_u91cf = _u56db
127 end
128 end
129 end 125 end
130 end 126 end
131end 127end
@@ -133,35 +129,27 @@ local _u8f93_u51fa
133if false then 129if false then
134 _u8f93_u51fa = _u4e00 130 _u8f93_u51fa = _u4e00
135else 131else
136 do 132 local _u6761_u4ef6x = true
137 local _u6761_u4ef6x = true 133 if _u6761_u4ef6x then
138 if _u6761_u4ef6x then 134 _u8f93_u51fa = _u4e8c
139 _u8f93_u51fa = _u4e8c 135 else
136 local _u6761_u4ef6z = true
137 if _u6761_u4ef6z then
138 _u8f93_u51fa = _u4e09
140 else 139 else
141 do 140 _u8f93_u51fa = _u56db
142 local _u6761_u4ef6z = true
143 if _u6761_u4ef6z then
144 _u8f93_u51fa = _u4e09
145 else
146 _u8f93_u51fa = _u56db
147 end
148 end
149 end 141 end
150 end 142 end
151end 143end
152local _u53d8_u91cf 144local _u53d8_u91cf
153_u53d8_u91cf = function() 145_u53d8_u91cf = function()
154 do 146 local _u67d0_u4e1c_u897f = true
155 local _u67d0_u4e1c_u897f = true 147 if _u67d0_u4e1c_u897f then
156 if _u67d0_u4e1c_u897f then 148 return 1
157 return 1 149 else
158 else 150 local _u53e6_u4e00_u4e2a = false
159 do 151 if _u53e6_u4e00_u4e2a then
160 local _u53e6_u4e00_u4e2a = false 152 return 2
161 if _u53e6_u4e00_u4e2a then
162 return 2
163 end
164 end
165 end 153 end
166 end 154 end
167end 155end
@@ -319,12 +307,10 @@ do
319 end 307 end
320end 308end
321do 309do
322 do 310 local __u6a21_u5757 = { }
323 local __u6a21_u5757 = { } 311 if __u6a21_u5757 then
324 if __u6a21_u5757 then 312 local _u4e1c_u897f = __u6a21_u5757["东西"]
325 local _u4e1c_u897f = __u6a21_u5757["东西"] 313 local a_u529f_u80fd, b_u529f_u80fd = __u6a21_u5757["a功能"], __u6a21_u5757["b功能"]
326 local a_u529f_u80fd, b_u529f_u80fd = __u6a21_u5757["a功能"], __u6a21_u5757["b功能"]
327 end
328 end 314 end
329end 315end
330do 316do
diff --git a/spec/outputs/unicode/destructure.lua b/spec/outputs/unicode/destructure.lua
index 002c4b0..7263d49 100644
--- a/spec/outputs/unicode/destructure.lua
+++ b/spec/outputs/unicode/destructure.lua
@@ -127,11 +127,9 @@ do
127 end 127 end
128end 128end
129do 129do
130 do 130 local _with_0 = _u4e1c_u897f
131 local _with_0 = _u4e1c_u897f 131 local _u5143_u7d20a, _u5143_u7d20b = _with_0[1], _with_0[2]
132 local _u5143_u7d20a, _u5143_u7d20b = _with_0[1], _with_0[2] 132 _u6253_u5370(_u5143_u7d20a, _u5143_u7d20b)
133 _u6253_u5370(_u5143_u7d20a, _u5143_u7d20b)
134 end
135end 133end
136do 134do
137 local _u4e1c_u897f = nil 135 local _u4e1c_u897f = nil
@@ -320,11 +318,9 @@ do
320 _tmp_0 = _obj_0["函数"] 318 _tmp_0 = _obj_0["函数"]
321 end 319 end
322 if _tmp_0 == nil then 320 if _tmp_0 == nil then
323 do 321 local _obj_0 = _u9879_u76ee
324 local _obj_0 = _u9879_u76ee 322 if _obj_0 ~= nil then
325 if _obj_0 ~= nil then 323 _tmp_0 = _obj_0["默认值"]
326 _tmp_0 = _obj_0["默认值"]
327 end
328 end 324 end
329 end 325 end
330 a_u5bf9_u8c61["b字段"](function() 326 a_u5bf9_u8c61["b字段"](function()
@@ -436,11 +432,9 @@ do
436 end 432 end
437 local _u53d8_u91cfy1, _u53d8_u91cfy4 433 local _u53d8_u91cfy1, _u53d8_u91cfy4
438 local _u5b57_u6bb5y2, _u5b57_u6bb5y3 434 local _u5b57_u6bb5y2, _u5b57_u6bb5y3
439 do 435 local _obj_0, _obj_1 = _u51fd_u65702()
440 local _obj_0, _obj_1 = _u51fd_u65702() 436 _u53d8_u91cfy1, _u53d8_u91cfy4 = _u51fd_u65701(), _obj_1
441 _u53d8_u91cfy1, _u53d8_u91cfy4 = _u51fd_u65701(), _obj_1 437 _u5b57_u6bb5y2, _u5b57_u6bb5y3 = _obj_0["字段y2"], _obj_0["字段y3"]
442 _u5b57_u6bb5y2, _u5b57_u6bb5y3 = _obj_0["字段y2"], _obj_0["字段y3"]
443 end
444end 438end
445do 439do
446 local _u53d8_u91cfv1, _u53d8_u91cfv2, _u53d8_u91cfv3, _u53d8_u91cfv4 440 local _u53d8_u91cfv1, _u53d8_u91cfv2, _u53d8_u91cfv3, _u53d8_u91cfv4
@@ -470,11 +464,9 @@ do
470end 464end
471do 465do
472 local _u503c, _u5143_u503c 466 local _u503c, _u5143_u503c
473 do 467 local _obj_0 = _u5bf9_u8c61tb
474 local _obj_0 = _u5bf9_u8c61tb 468 _u503c = _obj_0[_u540d_u79f0]
475 _u503c = _obj_0[_u540d_u79f0] 469 _u5143_u503c = getmetatable(_obj_0)[_u540d_u79f0]
476 _u5143_u503c = getmetatable(_obj_0)[_u540d_u79f0]
477 end
478end 470end
479do 471do
480 local tostring, add 472 local tostring, add
@@ -487,24 +479,22 @@ do
487 end) 479 end)
488 end 480 end
489 end 481 end
490 do 482 local _exp_0 = _u5bf9_u8c61tb
491 local _exp_0 = _u5bf9_u8c61tb 483 local _type_0 = type(_exp_0)
492 local _type_0 = type(_exp_0) 484 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
493 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 485 if _tab_0 then
494 if _tab_0 then 486 local name, _u5143_u5b57_u6bb5
495 local name, _u5143_u5b57_u6bb5 487 do
496 do 488 local _obj_0 = getmetatable(_exp_0)
497 local _obj_0 = getmetatable(_exp_0) 489 name = _obj_0.__name
498 name = _obj_0.__name 490 _u5143_u5b57_u6bb5 = _obj_0["123"]
499 _u5143_u5b57_u6bb5 = _obj_0["123"] 491 if name == nil then
500 if name == nil then 492 name = "项目"
501 name = "项目"
502 end
503 end
504 if _u5143_u5b57_u6bb5 ~= nil then
505 _u6253_u5370(name, _u5143_u5b57_u6bb5)
506 end 493 end
507 end 494 end
495 if _u5143_u5b57_u6bb5 ~= nil then
496 _u6253_u5370(name, _u5143_u5b57_u6bb5)
497 end
508 end 498 end
509end 499end
510do 500do
@@ -586,52 +576,50 @@ do
586 _u6253_u5370(add, _u5b57_u6bb5) 576 _u6253_u5370(add, _u5b57_u6bb5)
587 end 577 end
588 end 578 end
589 do 579 local _exp_0 = tb
590 local _exp_0 = tb 580 local _type_0 = type(_exp_0)
591 local _type_0 = type(_exp_0) 581 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
592 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 582 if _tab_0 then
593 if _tab_0 then 583 do
594 do 584 local _obj_0 = _exp_0["字段c"]
595 local _obj_0 = _exp_0["字段c"] 585 local _type_1 = type(_obj_0)
596 local _type_1 = type(_obj_0) 586 if "table" == _type_1 or "userdata" == _type_1 then
597 if "table" == _type_1 or "userdata" == _type_1 then 587 do
598 do 588 local _obj_1 = getmetatable(_obj_0)
599 local _obj_1 = getmetatable(_obj_0) 589 local _type_2 = type(_obj_1)
600 local _type_2 = type(_obj_1) 590 if "table" == _type_2 or "userdata" == _type_2 then
601 if "table" == _type_2 or "userdata" == _type_2 then 591 _u5143_u5b57_u6bb5 = _obj_1["字段abc"]
602 _u5143_u5b57_u6bb5 = _obj_1["字段abc"]
603 end
604 end 592 end
605 end 593 end
606 end 594 end
607 if _u5143_u5b57_u6bb5 == nil then 595 end
608 _u5143_u5b57_u6bb5 = "默认值" 596 if _u5143_u5b57_u6bb5 == nil then
609 end 597 _u5143_u5b57_u6bb5 = "默认值"
598 end
599 do
600 local _obj_0 = getmetatable(_exp_0)
610 do 601 do
611 local _obj_0 = getmetatable(_exp_0) 602 local _obj_1 = _obj_0[ [[any string]]]
612 do 603 local _type_1 = type(_obj_1)
613 local _obj_1 = _obj_0[ [[any string]]] 604 if "table" == _type_1 or "userdata" == _type_1 then
614 local _type_1 = type(_obj_1) 605 _u53d8_u91cfabc = _obj_1["字段d"]
615 if "table" == _type_1 or "userdata" == _type_1 then
616 _u53d8_u91cfabc = _obj_1["字段d"]
617 end
618 end
619 do
620 local _obj_1 = _obj_0['字符串']
621 local _type_1 = type(_obj_1)
622 if "table" == _type_1 or "userdata" == _type_1 then
623 _u6709_u9ed8_u8ba4_u503c = _obj_1["字段e"]
624 end
625 end
626 if _u53d8_u91cfabc == nil then
627 _u53d8_u91cfabc = 123
628 end 606 end
629 if _u6709_u9ed8_u8ba4_u503c == nil then 607 end
630 _u6709_u9ed8_u8ba4_u503c = { } 608 do
609 local _obj_1 = _obj_0['字符串']
610 local _type_1 = type(_obj_1)
611 if "table" == _type_1 or "userdata" == _type_1 then
612 _u6709_u9ed8_u8ba4_u503c = _obj_1["字段e"]
631 end 613 end
632 end 614 end
633 _u6253_u5370(_u5143_u5b57_u6bb5, _u53d8_u91cfabc, _u6709_u9ed8_u8ba4_u503c) 615 if _u53d8_u91cfabc == nil then
616 _u53d8_u91cfabc = 123
617 end
618 if _u6709_u9ed8_u8ba4_u503c == nil then
619 _u6709_u9ed8_u8ba4_u503c = { }
620 end
634 end 621 end
622 _u6253_u5370(_u5143_u5b57_u6bb5, _u53d8_u91cfabc, _u6709_u9ed8_u8ba4_u503c)
635 end 623 end
636end 624end
637return nil 625return nil
diff --git a/spec/outputs/unicode/global.lua b/spec/outputs/unicode/global.lua
index c91db52..a34ce6d 100644
--- a/spec/outputs/unicode/global.lua
+++ b/spec/outputs/unicode/global.lua
@@ -3,29 +3,27 @@ do
3 _u9177 = "📉" 3 _u9177 = "📉"
4end 4end
5do 5do
6 do 6 local _class_0
7 local _class_0 7 local _base_0 = {
8 local _base_0 = { 8 ["嗯"] = "🆒"
9 ["嗯"] = "🆒" 9 }
10 } 10 if _base_0.__index == nil then
11 if _base_0.__index == nil then 11 _base_0.__index = _base_0
12 _base_0.__index = _base_0
13 end
14 _class_0 = setmetatable({
15 __init = function() end,
16 __base = _base_0,
17 __name = "全局类"
18 }, {
19 __index = _base_0,
20 __call = function(cls, ...)
21 local _self_0 = setmetatable({ }, _base_0)
22 cls.__init(_self_0, ...)
23 return _self_0
24 end
25 })
26 _base_0.__class = _class_0
27 _u5168_u5c40_u7c7b = _class_0
28 end 12 end
13 _class_0 = setmetatable({
14 __init = function() end,
15 __base = _base_0,
16 __name = "全局类"
17 }, {
18 __index = _base_0,
19 __call = function(cls, ...)
20 local _self_0 = setmetatable({ }, _base_0)
21 cls.__init(_self_0, ...)
22 return _self_0
23 end
24 })
25 _base_0.__class = _class_0
26 _u5168_u5c40_u7c7b = _class_0
29end 27end
30do 28do
31 local _u53d8_u91cfc, _u53d8_u91cfd 29 local _u53d8_u91cfc, _u53d8_u91cfd
diff --git a/spec/outputs/unicode/import.lua b/spec/outputs/unicode/import.lua
index 3499295..e4aec89 100644
--- a/spec/outputs/unicode/import.lua
+++ b/spec/outputs/unicode/import.lua
@@ -30,16 +30,14 @@ do
30end 30end
31if _u7f29_u8fdb then 31if _u7f29_u8fdb then
32 local _u597d_u5427, _u5f88_u597d 32 local _u597d_u5427, _u5f88_u597d
33 do 33 local _obj_1 = _u5f88_u591a_u8868[100]
34 local _obj_1 = _u5f88_u591a_u8868[100] 34 _u597d_u5427, _u5f88_u597d = _obj_1["好吧"], (function()
35 _u597d_u5427, _u5f88_u597d = _obj_1["好吧"], (function() 35 local _base_0 = _obj_1
36 local _base_0 = _obj_1 36 local _fn_0 = _base_0["很好"]
37 local _fn_0 = _base_0["很好"] 37 return _fn_0 and function(...)
38 return _fn_0 and function(...) 38 return _fn_0(_base_0, ...)
39 return _fn_0(_base_0, ...) 39 end
40 end 40 end)()
41 end)()
42 end
43end 41end
44do 42do
45 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"] 43 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"]
diff --git a/spec/outputs/unicode/in_expression.lua b/spec/outputs/unicode/in_expression.lua
index 2f47b1f..4b8f711 100644
--- a/spec/outputs/unicode/in_expression.lua
+++ b/spec/outputs/unicode/in_expression.lua
@@ -173,10 +173,8 @@ do
173 _u51fd_u65704 = function() 173 _u51fd_u65704 = function()
174 local _u53d8_u91cfa = 2 174 local _u53d8_u91cfa = 2
175 local _u53d8_u91cfb 175 local _u53d8_u91cfb
176 do 176 local _val_0 = a
177 local _val_0 = a 177 _u53d8_u91cfb = 1 == _val_0 or 2 == _val_0 or 3 == _val_0 or 4 == _val_0
178 _u53d8_u91cfb = 1 == _val_0 or 2 == _val_0 or 3 == _val_0 or 4 == _val_0
179 end
180 end 178 end
181 local _u51fd_u65705 179 local _u51fd_u65705
182 _u51fd_u65705 = function() 180 _u51fd_u65705 = function()
diff --git a/spec/outputs/unicode/local.lua b/spec/outputs/unicode/local.lua
index 170144b..4b4b366 100644
--- a/spec/outputs/unicode/local.lua
+++ b/spec/outputs/unicode/local.lua
@@ -98,50 +98,46 @@ do
98 F_u4e94 = 6 98 F_u4e94 = 6
99 O_u4e00 = _class_0 99 O_u4e00 = _class_0
100 end 100 end
101 do 101 local _class_0
102 local _class_0 102 local N_u65e0
103 local N_u65e0 103 local _base_0 = { }
104 local _base_0 = { } 104 if _base_0.__index == nil then
105 if _base_0.__index == nil then 105 _base_0.__index = _base_0
106 _base_0.__index = _base_0 106 end
107 end 107 _class_0 = setmetatable({
108 _class_0 = setmetatable({ 108 __init = function() end,
109 __init = function() end, 109 __base = _base_0,
110 __base = _base_0, 110 __name = "T二"
111 __name = "T二" 111 }, {
112 }, { 112 __index = _base_0,
113 __index = _base_0, 113 __call = function(cls, ...)
114 __call = function(cls, ...) 114 local _self_0 = setmetatable({ }, _base_0)
115 local _self_0 = setmetatable({ }, _base_0) 115 cls.__init(_self_0, ...)
116 cls.__init(_self_0, ...) 116 return _self_0
117 return _self_0
118 end
119 })
120 _base_0.__class = _class_0
121 local self = _class_0;
122 do
123 local _class_1
124 local _base_1 = { }
125 if _base_1.__index == nil then
126 _base_1.__index = _base_1
127 end
128 _class_1 = setmetatable({
129 __init = function() end,
130 __base = _base_1,
131 __name = "N无"
132 }, {
133 __index = _base_1,
134 __call = function(cls, ...)
135 local _self_0 = setmetatable({ }, _base_1)
136 cls.__init(_self_0, ...)
137 return _self_0
138 end
139 })
140 _base_1.__class = _class_1
141 N_u65e0 = _class_1
142 end 117 end
143 T_u4e8c = _class_0 118 })
119 _base_0.__class = _class_0
120 local self = _class_0;
121 local _class_1
122 local _base_1 = { }
123 if _base_1.__index == nil then
124 _base_1.__index = _base_1
144 end 125 end
126 _class_1 = setmetatable({
127 __init = function() end,
128 __base = _base_1,
129 __name = "N无"
130 }, {
131 __index = _base_1,
132 __call = function(cls, ...)
133 local _self_0 = setmetatable({ }, _base_1)
134 cls.__init(_self_0, ...)
135 return _self_0
136 end
137 })
138 _base_1.__class = _class_1
139 N_u65e0 = _class_1
140 T_u4e8c = _class_0
145end 141end
146do 142do
147 local _list_0 = { } 143 local _list_0 = { }
diff --git a/spec/outputs/unicode/loops.lua b/spec/outputs/unicode/loops.lua
index d630343..8379993 100644
--- a/spec/outputs/unicode/loops.lua
+++ b/spec/outputs/unicode/loops.lua
@@ -297,17 +297,15 @@ end
297do 297do
298 for _u53d8_u91cfi = 1, 10 do 298 for _u53d8_u91cfi = 1, 10 do
299 repeat 299 repeat
300 do 300 local _with_0 = _u5bf9_u8c61tb
301 local _with_0 = _u5bf9_u8c61tb 301 if _with_0 ~= nil then
302 if _with_0 ~= nil then 302 _with_0["字段a"] = 1
303 _with_0["字段a"] = 1 303 if _with_0["字段b"] then
304 if _with_0["字段b"] then 304 goto _continue_12
305 goto _continue_12 305 end
306 end 306 do
307 do 307 if _with_0["字段c"] then
308 if _with_0["字段c"] then 308 break
309 break
310 end
311 end 309 end
312 end 310 end
313 end 311 end
diff --git a/spec/outputs/unicode/macro.lua b/spec/outputs/unicode/macro.lua
index 88f6de7..069f429 100644
--- a/spec/outputs/unicode/macro.lua
+++ b/spec/outputs/unicode/macro.lua
@@ -1,4 +1,6 @@
1assert(_u5bf9_u8c61 == nil) 1do
2 assert(_u5bf9_u8c61 == nil)
3end
2local _u7ed3_u679c = (_u5bf9_u8c61 == nil) 4local _u7ed3_u679c = (_u5bf9_u8c61 == nil)
3if _u51fd_u65701() then 5if _u51fd_u65701() then
4 _u6253_u5370("没问题") 6 _u6253_u5370("没问题")
@@ -9,89 +11,89 @@ end
9local _u5bf9_u8c61 11local _u5bf9_u8c61
10do 12do
11 local __u6e90_, __u76ee_u6807_ 13 local __u6e90_, __u76ee_u6807_
12 do 14 __u76ee_u6807_ = {
13 __u76ee_u6807_ = { 15 ["位置"] = { },
14 ["位置"] = { }, 16 ["标签"] = (function()
15 ["标签"] = (function() 17 local _call_0 = _u6807_u7b7e
16 local _call_0 = _u6807_u7b7e 18 return _call_0["转数字"](_call_0)
17 return _call_0["转数字"](_call_0) 19 end)()
18 end)() 20 }
19 } 21 __u6e90_ = self
20 do 22 __u76ee_u6807_["标识"] = __u6e90_["标识"]
21 __u6e90_ = self 23 __u76ee_u6807_["连接们"] = __u6e90_["连接们"]
22 __u76ee_u6807_["标识"] = __u6e90_["标识"] 24 __u76ee_u6807_["位置"]["x坐标"] = __u6e90_["位置"]["x坐标"]
23 __u76ee_u6807_["连接们"] = __u6e90_["连接们"] 25 __u76ee_u6807_["位置"]["y坐标"] = __u6e90_["位置"]["y坐标"]
24 __u76ee_u6807_["位置"]["x坐标"] = __u6e90_["位置"]["x坐标"] 26 __u76ee_u6807_["位置"]["z坐标"] = __u6e90_["位置"]["z坐标"]
25 __u76ee_u6807_["位置"]["y坐标"] = __u6e90_["位置"]["y坐标"] 27 _u5bf9_u8c61 = __u76ee_u6807_
26 __u76ee_u6807_["位置"]["z坐标"] = __u6e90_["位置"]["z坐标"]
27 end
28 _u5bf9_u8c61 = __u76ee_u6807_
29 end
30end 28end
31if (_u53d8_u91cfx == "🍎" or _u53d8_u91cfx == "🐷" or _u53d8_u91cfx == "🐶") then 29if (_u53d8_u91cfx == "🍎" or _u53d8_u91cfx == "🐷" or _u53d8_u91cfx == "🐶") then
32 _u6253_u5370("存在") 30 _u6253_u5370("存在")
33end 31end
34local _list_0 = (function() 32do
35 local _accum_0 = { }
36 local _len_0 = 1
37 local _list_0 = (function() 33 local _list_0 = (function()
38 local _accum_1 = { } 34 local _accum_0 = { }
39 local _len_1 = 1 35 local _len_0 = 1
40 local _list_0 = { 36 local _list_0 = (function()
41 1, 37 local _accum_1 = { }
42 2, 38 local _len_1 = 1
43 3 39 local _list_0 = {
44 } 40 1,
41 2,
42 3
43 }
44 for _index_0 = 1, #_list_0 do
45 local _ = _list_0[_index_0]
46 _accum_1[_len_1] = _ * 2
47 _len_1 = _len_1 + 1
48 end
49 return _accum_1
50 end)()
45 for _index_0 = 1, #_list_0 do 51 for _index_0 = 1, #_list_0 do
46 local _ = _list_0[_index_0] 52 local _ = _list_0[_index_0]
47 _accum_1[_len_1] = _ * 2 53 if _ > 4 then
48 _len_1 = _len_1 + 1 54 _accum_0[_len_0] = _
55 _len_0 = _len_0 + 1
56 end
49 end 57 end
50 return _accum_1 58 return _accum_0
51 end)() 59 end)()
52 for _index_0 = 1, #_list_0 do 60 for _index_0 = 1, #_list_0 do
53 local _ = _list_0[_index_0] 61 local _ = _list_0[_index_0]
54 if _ > 4 then 62 _u6253_u5370(_)
55 _accum_0[_len_0] = _
56 _len_0 = _len_0 + 1
57 end
58 end 63 end
59 return _accum_0
60end)()
61for _index_0 = 1, #_list_0 do
62 local _ = _list_0[_index_0]
63 _u6253_u5370(_)
64end 64end
65local _list_1 = (function() 65do
66 local _accum_0 = { } 66 local _list_0 = (function()
67 local _len_0 = 1 67 local _accum_0 = { }
68 local _list_1 = (function() 68 local _len_0 = 1
69 local _accum_1 = { } 69 local _list_0 = (function()
70 local _len_1 = 1 70 local _accum_1 = { }
71 local _list_1 = { 71 local _len_1 = 1
72 1, 72 local _list_0 = {
73 2, 73 1,
74 3 74 2,
75 } 75 3
76 for _index_0 = 1, #_list_1 do 76 }
77 local _ = _list_1[_index_0] 77 for _index_0 = 1, #_list_0 do
78 _accum_1[_len_1] = _ * 2 78 local _ = _list_0[_index_0]
79 _len_1 = _len_1 + 1 79 _accum_1[_len_1] = _ * 2
80 _len_1 = _len_1 + 1
81 end
82 return _accum_1
83 end)()
84 for _index_0 = 1, #_list_0 do
85 local _ = _list_0[_index_0]
86 if _ > 4 then
87 _accum_0[_len_0] = _
88 _len_0 = _len_0 + 1
89 end
80 end 90 end
81 return _accum_1 91 return _accum_0
82 end)() 92 end)()
83 for _index_0 = 1, #_list_1 do 93 for _index_0 = 1, #_list_0 do
84 local _ = _list_1[_index_0] 94 local _ = _list_0[_index_0]
85 if _ > 4 then 95 _u6253_u5370(_)
86 _accum_0[_len_0] = _
87 _len_0 = _len_0 + 1
88 end
89 end 96 end
90 return _accum_0
91end)()
92for _index_0 = 1, #_list_1 do
93 local _ = _list_1[_index_0]
94 _u6253_u5370(_)
95end 97end
96local _u503c 98local _u503c
97do 99do
@@ -99,13 +101,13 @@ do
99 do 101 do
100 local _accum_0 = { } 102 local _accum_0 = { }
101 local _len_0 = 1 103 local _len_0 = 1
102 local _list_2 = { 104 local _list_0 = {
103 1, 105 1,
104 2, 106 2,
105 3 107 3
106 } 108 }
107 for _index_0 = 1, #_list_2 do 109 for _index_0 = 1, #_list_0 do
108 local _ = _list_2[_index_0] 110 local _ = _list_0[_index_0]
109 _accum_0[_len_0] = _ * 2 111 _accum_0[_len_0] = _ * 2
110 _len_0 = _len_0 + 1 112 _len_0 = _len_0 + 1
111 end 113 end
@@ -137,8 +139,10 @@ do
137 end 139 end
138 _u503c = _4 140 _u503c = _4
139end 141end
140local _call_0 = (1 + 2) 142do
141_call_0["调用"](_call_0, 123) 143 local _call_0 = (1 + 2)
144 _call_0["调用"](_call_0, 123)
145end
142_u7ed3_u679c = (1 + 2) 146_u7ed3_u679c = (1 + 2)
143local f 147local f
144f = function(_u53c2_u6570x) 148f = function(_u53c2_u6570x)
@@ -203,7 +207,7 @@ local function dummy()
203end 207end
204-- 这有个注释 208-- 这有个注释
205local _ = require('下划线') 209local _ = require('下划线')
206local _call_1 = (_({ 210local _call_0 = (_({
207 1, 211 1,
208 2, 212 2,
209 3, 213 3,
@@ -211,61 +215,65 @@ local _call_1 = (_({
211 -2, 215 -2,
212 3 216 3
213})) 217}))
214_call_1 = _call_1["链"](_call_1) 218_call_0 = _call_0["链"](_call_0)
215_call_1 = _call_1["映射"](_call_1, function(self) 219_call_0 = _call_0["映射"](_call_0, function(self)
216 return self * 2 220 return self * 2
217end) 221end)
218_call_1 = _call_1["过滤"](_call_1, function(self) 222_call_0 = _call_0["过滤"](_call_0, function(self)
219 return self > 3 223 return self > 3
220end) 224end)
221local _u7ed3_u679ca = _call_1["取值"](_call_1) 225local _u7ed3_u679ca = _call_0["取值"](_call_0)
222local _call_2 = (_({
223 1,
224 2,
225 3,
226 4,
227 -2,
228 3
229}))
230_call_2 = _call_2["链"](_call_2)
231_call_2 = _call_2["映射"](_call_2, function(self)
232 return self * 2
233end)
234_call_2 = _call_2["过滤"](_call_2, function(self)
235 return self > 3
236end)
237_call_2["每一个"](_call_2, function(self)
238 return _u6253_u5370(self)
239end)
240local _call_3 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
241_call_3 = _call_3["父节点"](_call_3)
242_call_3 = _call_3["后代"](_call_3)
243_call_3 = _call_3["选择启用"](_call_3)
244_call_3 = _call_3["选择可见"](_call_3)
245_call_3 = _call_3["标签等于"](_call_3, "fx")
246_call_3 = _call_3["其中"](_call_3, function(x)
247 local _call_4 = x["名称"]
248 return _call_4["结尾为"](_call_4, "(克隆)")
249end)
250_u7ed3_u679c = _call_3["摧毁"](_call_3)
251do 226do
252 local _1 227 local _call_1 = (_({
253 local _call_4 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] 228 1,
254 _1 = _call_4["父节点"](_call_4) 229 2,
255 local _2 230 3,
256 _2 = _1["后代"](_1) 231 4,
257 local _3 232 -2,
258 _3 = _2["选择启用"](_2) 233 3
259 local _4 234 }))
260 _4 = _3["选择可见"](_3) 235 _call_1 = _call_1["链"](_call_1)
261 local _5 236 _call_1 = _call_1["映射"](_call_1, function(self)
262 _5 = _4["标签等于"](_4, "fx") 237 return self * 2
263 local _6 238 end)
264 _6 = _5["其中"](_5, function(x) 239 _call_1 = _call_1["过滤"](_call_1, function(self)
265 local _call_5 = x["名称"] 240 return self > 3
266 return _call_5["结尾为"](_call_5, "(克隆)") 241 end)
242 _call_1["每一个"](_call_1, function(self)
243 return _u6253_u5370(self)
267 end) 244 end)
268 _6["摧毁"](_6) 245end
246local _call_1 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
247_call_1 = _call_1["父节点"](_call_1)
248_call_1 = _call_1["后代"](_call_1)
249_call_1 = _call_1["选择启用"](_call_1)
250_call_1 = _call_1["选择可见"](_call_1)
251_call_1 = _call_1["标签等于"](_call_1, "fx")
252_call_1 = _call_1["其中"](_call_1, function(x)
253 local _call_2 = x["名称"]
254 return _call_2["结尾为"](_call_2, "(克隆)")
255end)
256_u7ed3_u679c = _call_1["摧毁"](_call_1)
257do
258 do
259 local _1
260 local _call_2 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
261 _1 = _call_2["父节点"](_call_2)
262 local _2
263 _2 = _1["后代"](_1)
264 local _3
265 _3 = _2["选择启用"](_2)
266 local _4
267 _4 = _3["选择可见"](_3)
268 local _5
269 _5 = _4["标签等于"](_4, "fx")
270 local _6
271 _6 = _5["其中"](_5, function(x)
272 local _call_3 = x["名称"]
273 return _call_3["结尾为"](_call_3, "(克隆)")
274 end)
275 _6["摧毁"](_6)
276 end
269end 277end
270local _call_0 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] 278local _call_0 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
271_call_0["父节点"](_call_0):_u540e_u4ee3():_u9009_u62e9_u542f_u7528():_u9009_u62e9_u53ef_u89c1():_u6807_u7b7e_u7b49_u4e8e("fx"):_u5176_u4e2d(function(x) 279_call_0["父节点"](_call_0):_u540e_u4ee3():_u9009_u62e9_u542f_u7528():_u9009_u62e9_u53ef_u89c1():_u6807_u7b7e_u7b49_u4e8e("fx"):_u5176_u4e2d(function(x)
@@ -302,7 +310,9 @@ _u6253_u5370((setmetatable({
302 end 310 end
303})) 311}))
304_u6253_u5370("当前代码行数: " .. tostring(268)) 312_u6253_u5370("当前代码行数: " .. tostring(268))
313do
305-- 待实现 314-- 待实现
315end
306do 316do
307 _u6253_u5370(1) 317 _u6253_u5370(1)
308end 318end
@@ -317,5 +327,7 @@ _1 = function()
317 end 327 end
318 return _accum_0 328 return _accum_0
319end 329end
320_u6253_u5370('abc') 330do
321return 123 331 _u6253_u5370('abc')
332 return 123
333end
diff --git a/spec/outputs/unicode/metatable.lua b/spec/outputs/unicode/metatable.lua
index b6ee48a..c7c8730 100644
--- a/spec/outputs/unicode/metatable.lua
+++ b/spec/outputs/unicode/metatable.lua
@@ -48,19 +48,17 @@ do
48end 48end
49do 49do
50 local _u53d8_u91cfx, _u65b0, _u53d8_u91cf, close, _u5173_u95edA, num, add, sub 50 local _u53d8_u91cfx, _u65b0, _u53d8_u91cf, close, _u5173_u95edA, num, add, sub
51 local _obj_0, _obj_1
52 _u53d8_u91cfx, _obj_0, _obj_1 = 123, _u53d8_u91cfa["变量b"]["变量c"], _u51fd_u6570()
53 _u65b0, _u53d8_u91cf = _obj_0["新"], _obj_0["变量"]
51 do 54 do
52 local _obj_0, _obj_1 55 local _obj_2 = getmetatable(_obj_0)
53 _u53d8_u91cfx, _obj_0, _obj_1 = 123, _u53d8_u91cfa["变量b"]["变量c"], _u51fd_u6570() 56 close, _u5173_u95edA = _obj_2.__close, _obj_2.__close
54 _u65b0, _u53d8_u91cf = _obj_0["新"], _obj_0["变量"] 57 end
55 do 58 num = _obj_1.num
56 local _obj_2 = getmetatable(_obj_0) 59 do
57 close, _u5173_u95edA = _obj_2.__close, _obj_2.__close 60 local _obj_2 = getmetatable(_obj_1)
58 end 61 add, sub = _obj_2.__add, _obj_2.__sub
59 num = _obj_1.num
60 do
61 local _obj_2 = getmetatable(_obj_1)
62 add, sub = _obj_2.__add, _obj_2.__sub
63 end
64 end 62 end
65end 63end
66setmetatable(_u53d8_u91cfa["变量b"], { }) 64setmetatable(_u53d8_u91cfa["变量b"], { })
diff --git a/spec/outputs/unicode/multiline_chain.lua b/spec/outputs/unicode/multiline_chain.lua
index f45e71f..c1da13f 100644
--- a/spec/outputs/unicode/multiline_chain.lua
+++ b/spec/outputs/unicode/multiline_chain.lua
@@ -127,16 +127,14 @@ do
127 _with_0["项目方法C"](_with_0, _u53d8_u91cfi) 127 _with_0["项目方法C"](_with_0, _u53d8_u91cfi)
128 end 128 end
129 if not _with_0["变量b"] then 129 if not _with_0["变量b"] then
130 do 130 local _accum_0 = { }
131 local _accum_0 = { } 131 local _len_0 = 1
132 local _len_0 = 1 132 while _with_0["项目字段D"] do
133 while _with_0["项目字段D"] do 133 local _call_17 = _with_0["下一个项目"](_with_0)
134 local _call_17 = _with_0["下一个项目"](_with_0) 134 _accum_0[_len_0] = _call_17["取得"](_call_17)
135 _accum_0[_len_0] = _call_17["取得"](_call_17) 135 _len_0 = _len_0 + 1
136 _len_0 = _len_0 + 1
137 end
138 _with_0["变量c"] = _accum_0
139 end 136 end
137 _with_0["变量c"] = _accum_0
140 end 138 end
141end 139end
142return nil 140return nil
diff --git a/spec/outputs/unicode/nil_coalescing.lua b/spec/outputs/unicode/nil_coalescing.lua
index 90fd097..53e3711 100644
--- a/spec/outputs/unicode/nil_coalescing.lua
+++ b/spec/outputs/unicode/nil_coalescing.lua
@@ -1,23 +1,19 @@
1do 1do
2 local _u53d8_u91cfa 2 local _u53d8_u91cfa
3 do 3 local _exp_0 = _u53d8_u91cfb
4 local _exp_0 = _u53d8_u91cfb 4 if _exp_0 ~= nil then
5 if _exp_0 ~= nil then 5 _u53d8_u91cfa = _exp_0
6 _u53d8_u91cfa = _exp_0 6 else
7 else 7 _u53d8_u91cfa = _u53d8_u91cfc
8 _u53d8_u91cfa = _u53d8_u91cfc
9 end
10 end 8 end
11end 9end
12do 10do
13 local _u5b57_u6bb5a 11 local _u5b57_u6bb5a
14 do 12 local _exp_0 = _u53d8_u91cfb
15 local _exp_0 = _u53d8_u91cfb 13 if _exp_0 ~= nil then
16 if _exp_0 ~= nil then 14 _u5b57_u6bb5a = _exp_0["字段a"]
17 _u5b57_u6bb5a = _exp_0["字段a"] 15 else
18 else 16 _u5b57_u6bb5a = _u53d8_u91cfc["字段a"]
19 _u5b57_u6bb5a = _u53d8_u91cfc["字段a"]
20 end
21 end 17 end
22end 18end
23do 19do
@@ -50,23 +46,21 @@ do
50end 46end
51do 47do
52 local _u53d8_u91cfa 48 local _u53d8_u91cfa
53 do 49 local _exp_0 = _u53d8_u91cfb
54 local _exp_0 = _u53d8_u91cfb 50 if _exp_0 ~= nil then
55 if _exp_0 ~= nil then 51 _u53d8_u91cfa = _exp_0
56 _u53d8_u91cfa = _exp_0 52 else
57 else 53 do
58 do 54 local _exp_1 = _u53d8_u91cfc
59 local _exp_1 = _u53d8_u91cfc 55 if _exp_1 ~= nil then
60 if _exp_1 ~= nil then 56 _u53d8_u91cfa = _exp_1
61 _u53d8_u91cfa = _exp_1 57 else
62 else 58 do
63 do 59 local _exp_2 = _u53d8_u91cfd
64 local _exp_2 = _u53d8_u91cfd 60 if _exp_2 ~= nil then
65 if _exp_2 ~= nil then 61 _u53d8_u91cfa = _exp_2
66 _u53d8_u91cfa = _exp_2 62 else
67 else 63 _u53d8_u91cfa = _u53d8_u91cfe
68 _u53d8_u91cfa = _u53d8_u91cfe
69 end
70 end 64 end
71 end 65 end
72 end 66 end
@@ -84,18 +78,14 @@ do
84 end)()) 78 end)())
85end 79end
86do 80do
87 do 81 local _with_0
88 local _with_0 82 local _exp_0 = _u51fd_u6570A()
89 do 83 if _exp_0 ~= nil then
90 local _exp_0 = _u51fd_u6570A() 84 _with_0 = _exp_0
91 if _exp_0 ~= nil then 85 else
92 _with_0 = _exp_0 86 _with_0 = _u51fd_u6570B()
93 else
94 _with_0 = _u51fd_u6570B()
95 end
96 end
97 _u6253_u5370(_with_0["字段"])
98 end 87 end
88 _u6253_u5370(_with_0["字段"])
99end 89end
100do 90do
101 local _u53d8_u91cfa = 1 + 2 + (function() 91 local _u53d8_u91cfa = 1 + 2 + (function()
@@ -138,18 +128,16 @@ do
138end 128end
139do 129do
140 local _u53d8_u91cfa 130 local _u53d8_u91cfa
141 do 131 local _exp_0 = 1
142 local _exp_0 = 1 132 if _exp_0 ~= nil then
143 if _exp_0 ~= nil then 133 _u53d8_u91cfa = _exp_0
144 _u53d8_u91cfa = _exp_0 134 else
145 else 135 do
146 do 136 local _exp_1 = 2
147 local _exp_1 = 2 137 if _exp_1 ~= nil then
148 if _exp_1 ~= nil then 138 _u53d8_u91cfa = _exp_1
149 _u53d8_u91cfa = _exp_1 139 else
150 else 140 _u53d8_u91cfa = 3
151 _u53d8_u91cfa = 3
152 end
153 end 141 end
154 end 142 end
155 end 143 end
diff --git a/spec/outputs/unicode/stub.lua b/spec/outputs/unicode/stub.lua
index 5f183a1..426967b 100644
--- a/spec/outputs/unicode/stub.lua
+++ b/spec/outputs/unicode/stub.lua
@@ -15,12 +15,10 @@ end
15_u6253_u5370(_u51fd_u6570()) 15_u6253_u5370(_u51fd_u6570())
16_u6253_u5370(_u53d8_u91cfx["值"](_u53d8_u91cfx)); 16_u6253_u5370(_u53d8_u91cfx["值"](_u53d8_u91cfx));
17(function(...) 17(function(...)
18 do 18 local _base_0 = _u4f60_u597d(...)
19 local _base_0 = _u4f60_u597d(...) 19 local _fn_0 = _base_0["世界"]
20 local _fn_0 = _base_0["世界"] 20 _u53d8_u91cfx = _fn_0 and function(...)
21 _u53d8_u91cfx = _fn_0 and function(...) 21 return _fn_0(_base_0, ...)
22 return _fn_0(_base_0, ...)
23 end
24 end 22 end
25end)() 23end)()
26return nil 24return nil
diff --git a/spec/outputs/unicode/switch.lua b/spec/outputs/unicode/switch.lua
index 6b8bbdc..76c078c 100644
--- a/spec/outputs/unicode/switch.lua
+++ b/spec/outputs/unicode/switch.lua
@@ -45,13 +45,11 @@ do
45end 45end
46do 46do
47 local _with_0 = _u4e1c_u897f 47 local _with_0 = _u4e1c_u897f
48 do 48 local _exp_0 = _with_0["值"](_with_0)
49 local _exp_0 = _with_0["值"](_with_0) 49 if _with_0["确定"] == _exp_0 then
50 if _with_0["确定"] == _exp_0 then 50 local _u53d8_u91cf_ = "世界"
51 local _u53d8_u91cf_ = "世界" 51 else
52 else 52 local _u53d8_u91cf_ = "是的"
53 local _u53d8_u91cf_ = "是的"
54 end
55 end 53 end
56end 54end
57_u4fee_u590d(_u8fd9_u4e2a) 55_u4fee_u590d(_u8fd9_u4e2a)
@@ -106,66 +104,64 @@ do
106 } 104 }
107 } 105 }
108 } 106 }
109 do 107 local _type_0 = type(_u5b57_u5178)
110 local _type_0 = type(_u5b57_u5178) 108 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
111 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 109 if _tab_0 then
112 if _tab_0 then 110 local _u7b2c_u4e00 = _u5b57_u5178[1]
113 local _u7b2c_u4e00 = _u5b57_u5178[1] 111 local _u4e00_u4e2a
114 local _u4e00_u4e2a 112 do
115 do 113 local _obj_0 = _u5b57_u5178[2]
116 local _obj_0 = _u5b57_u5178[2] 114 local _type_1 = type(_obj_0)
117 local _type_1 = type(_obj_0) 115 if "table" == _type_1 or "userdata" == _type_1 then
118 if "table" == _type_1 or "userdata" == _type_1 then 116 _u4e00_u4e2a = _obj_0[1]
119 _u4e00_u4e2a = _obj_0[1]
120 end
121 end 117 end
122 local _u4e24_u4e2a 118 end
123 do 119 local _u4e24_u4e2a
124 local _obj_0 = _u5b57_u5178[2] 120 do
125 local _type_1 = type(_obj_0) 121 local _obj_0 = _u5b57_u5178[2]
126 if "table" == _type_1 or "userdata" == _type_1 then 122 local _type_1 = type(_obj_0)
127 _u4e24_u4e2a = _obj_0[2] 123 if "table" == _type_1 or "userdata" == _type_1 then
128 end 124 _u4e24_u4e2a = _obj_0[2]
129 end 125 end
130 local _u4e09_u4e2a 126 end
131 do 127 local _u4e09_u4e2a
132 local _obj_0 = _u5b57_u5178[2] 128 do
133 local _type_1 = type(_obj_0) 129 local _obj_0 = _u5b57_u5178[2]
134 if "table" == _type_1 or "userdata" == _type_1 then 130 local _type_1 = type(_obj_0)
135 _u4e09_u4e2a = _obj_0[3] 131 if "table" == _type_1 or "userdata" == _type_1 then
136 end 132 _u4e09_u4e2a = _obj_0[3]
137 end 133 end
138 local _u53d8_u91cfc 134 end
139 do 135 local _u53d8_u91cfc
140 local _obj_0 = _u5b57_u5178["变量a"] 136 do
141 local _type_1 = type(_obj_0) 137 local _obj_0 = _u5b57_u5178["变量a"]
142 if "table" == _type_1 or "userdata" == _type_1 then 138 local _type_1 = type(_obj_0)
143 do 139 if "table" == _type_1 or "userdata" == _type_1 then
144 local _obj_1 = _obj_0["变量b"] 140 do
145 local _type_2 = type(_obj_1) 141 local _obj_1 = _obj_0["变量b"]
146 if "table" == _type_2 or "userdata" == _type_2 then 142 local _type_2 = type(_obj_1)
147 _u53d8_u91cfc = _obj_1["变量c"] 143 if "table" == _type_2 or "userdata" == _type_2 then
148 end 144 _u53d8_u91cfc = _obj_1["变量c"]
149 end 145 end
150 end 146 end
151 end 147 end
152 local _u53d8_u91cfz 148 end
153 do 149 local _u53d8_u91cfz
154 local _obj_0 = _u5b57_u5178["变量x"] 150 do
155 local _type_1 = type(_obj_0) 151 local _obj_0 = _u5b57_u5178["变量x"]
156 if "table" == _type_1 or "userdata" == _type_1 then 152 local _type_1 = type(_obj_0)
157 do 153 if "table" == _type_1 or "userdata" == _type_1 then
158 local _obj_1 = _obj_0["变量y"] 154 do
159 local _type_2 = type(_obj_1) 155 local _obj_1 = _obj_0["变量y"]
160 if "table" == _type_2 or "userdata" == _type_2 then 156 local _type_2 = type(_obj_1)
161 _u53d8_u91cfz = _obj_1["变量z"] 157 if "table" == _type_2 or "userdata" == _type_2 then
162 end 158 _u53d8_u91cfz = _obj_1["变量z"]
163 end 159 end
164 end 160 end
165 end 161 end
166 if _u7b2c_u4e00 ~= nil and _u4e00_u4e2a ~= nil and _u4e24_u4e2a ~= nil and _u4e09_u4e2a ~= nil and _u53d8_u91cfc ~= nil and _u53d8_u91cfz ~= nil then 162 end
167 _u6253_u5370(_u7b2c_u4e00, _u4e00_u4e2a, _u4e24_u4e2a, _u4e09_u4e2a, _u53d8_u91cfc, _u53d8_u91cfz) 163 if _u7b2c_u4e00 ~= nil and _u4e00_u4e2a ~= nil and _u4e24_u4e2a ~= nil and _u4e09_u4e2a ~= nil and _u53d8_u91cfc ~= nil and _u53d8_u91cfz ~= nil then
168 end 164 _u6253_u5370(_u7b2c_u4e00, _u4e00_u4e2a, _u4e24_u4e2a, _u4e09_u4e2a, _u53d8_u91cfc, _u53d8_u91cfz)
169 end 165 end
170 end 166 end
171end 167end
@@ -183,56 +179,54 @@ do
183 } 179 }
184 for _index_0 = 1, #_u7269_u54c1 do 180 for _index_0 = 1, #_u7269_u54c1 do
185 local _u7269 = _u7269_u54c1[_index_0] 181 local _u7269 = _u7269_u54c1[_index_0]
186 do 182 local _type_0 = type(_u7269)
187 local _type_0 = type(_u7269) 183 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
188 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 184 local _match_0 = false
189 local _match_0 = false 185 if _tab_0 then
186 local _u53d8_u91cfx = _u7269["变量x"]
187 local _u53d8_u91cfy = _u7269["变量y"]
188 if _u53d8_u91cfx ~= nil and _u53d8_u91cfy ~= nil then
189 _match_0 = true
190 _u6253_u5370("Vec2 " .. tostring(_u53d8_u91cfx) .. ", " .. tostring(_u53d8_u91cfy))
191 end
192 end
193 if not _match_0 then
194 local _match_1 = false
190 if _tab_0 then 195 if _tab_0 then
191 local _u53d8_u91cfx = _u7269["量x"] 196 local _u5bbd_u5ea6 = _u7269[""]
192 local _u53d8_u91cfy = _u7269["y"] 197 local _u9ad8_u5ea6 = _u7269[""]
193 if _u53d8_u91cfx ~= nil and _u53d8_u91cfy ~= nil then 198 if _u5bbd_u5ea6 ~= nil and _u9ad8_u5ea6 ~= nil then
194 _match_0 = true 199 _match_1 = true
195 _u6253_u5370("Vec2 " .. tostring(_u53d8_u91cfx) .. ", " .. tostring(_u53d8_u91cfy)) 200 _u6253_u5370("Size " .. tostring(_u5bbd_u5ea6) .. ", " .. tostring(_u9ad8_u5ea6))
196 end 201 end
197 end 202 end
198 if not _match_0 then 203 if not _match_1 then
199 local _match_1 = false 204 if false == _u7269 then
200 if _tab_0 then 205 _u6253_u5370("没有")
201 local _u5bbd_u5ea6 = _u7269["宽度"] 206 else
202 local _u9ad8_u5ea6 = _u7269["高度"] 207 local _match_2 = false
203 if _u5bbd_u5ea6 ~= nil and _u9ad8_u5ea6 ~= nil then 208 if _tab_0 then
204 _match_1 = true 209 local _u7c7b = _u7269["__类"]
205 _u6253_u5370("Size " .. tostring(_u5bbd_u5ea6) .. ", " .. tostring(_u9ad8_u5ea6)) 210 if _u7c7b ~= nil then
211 _match_2 = true
212 if _u7c7b_u522bA == _u7c7b then
213 _u6253_u5370("对象 A")
214 elseif _u7c7b_u522bB == _u7c7b then
215 _u6253_u5370("对象 B")
216 end
217 end
206 end 218 end
207 end 219 if not _match_2 then
208 if not _match_1 then 220 local _match_3 = false
209 if false == _u7269 then
210 _u6253_u5370("没有")
211 else
212 local _match_2 = false
213 if _tab_0 then 221 if _tab_0 then
214 local _u7c7b = _u7269["__类"] 222 local _u8868 = getmetatable(_u7269)
215 if _u7c7b ~= nil then 223 if _u8868 ~= nil then
216 _match_2 = true 224 _match_3 = true
217 if _u7c7b_u522bA == _u7c7b then 225 _u6253_u5370("带有元表的表")
218 _u6253_u5370("对象 A")
219 elseif _u7c7b_u522bB == _u7c7b then
220 _u6253_u5370("对象 B")
221 end
222 end 226 end
223 end 227 end
224 if not _match_2 then 228 if not _match_3 then
225 local _match_3 = false 229 _u6253_u5370("物品不被接受!")
226 if _tab_0 then
227 local _u8868 = getmetatable(_u7269)
228 if _u8868 ~= nil then
229 _match_3 = true
230 _u6253_u5370("带有元表的表")
231 end
232 end
233 if not _match_3 then
234 _u6253_u5370("物品不被接受!")
235 end
236 end 230 end
237 end 231 end
238 end 232 end
@@ -271,72 +265,66 @@ do
271 end 265 end
272 end 266 end
273 end 267 end
274 do 268 local _type_0 = type(_u8868_u683c)
275 local _type_0 = type(_u8868_u683c) 269 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
276 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 270 local _match_0 = false
277 local _match_0 = false 271 if _tab_0 then
278 if _tab_0 then 272 local _u53d8_u91cfa = _u8868_u683c["变量a"]
279 local _u53d8_u91cfa = _u8868_u683c["变量a"] 273 local _u53d8_u91cfb = _u8868_u683c["变量b"]
280 local _u53d8_u91cfb = _u8868_u683c["变量b"] 274 if _u53d8_u91cfa ~= nil and _u53d8_u91cfb ~= nil then
281 if _u53d8_u91cfa ~= nil and _u53d8_u91cfb ~= nil then 275 _match_0 = true
282 _match_0 = true 276 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb)
283 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb)
284 end
285 end
286 if not _match_0 then
287 _u6253_u5370("没有匹配")
288 end 277 end
289 end 278 end
279 if not _match_0 then
280 _u6253_u5370("没有匹配")
281 end
290end 282end
291do 283do
292 local _u8868_u683c = { 284 local _u8868_u683c = {
293 ["变量x"] = "abc" 285 ["变量x"] = "abc"
294 } 286 }
295 do 287 local _type_0 = type(_u8868_u683c)
296 local _type_0 = type(_u8868_u683c) 288 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
297 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 289 local _match_0 = false
298 local _match_0 = false 290 if _tab_0 then
291 local _u53d8_u91cfx = _u8868_u683c["变量x"]
292 local _u53d8_u91cfy = _u8868_u683c["变量y"]
293 if _u53d8_u91cfx ~= nil and _u53d8_u91cfy ~= nil then
294 _match_0 = true
295 _u6253_u5370("变量x: " .. tostring(_u53d8_u91cfx) .. " 和 变量y: " .. tostring(_u53d8_u91cfy))
296 end
297 end
298 if not _match_0 then
299 if _tab_0 then 299 if _tab_0 then
300 local _u53d8_u91cfx = _u8868_u683c["变量x"] 300 local _u53d8_u91cfx = _u8868_u683c["变量x"]
301 local _u53d8_u91cfy = _u8868_u683c["变量y"] 301 if _u53d8_u91cfx ~= nil then
302 if _u53d8_u91cfx ~= nil and _u53d8_u91cfy ~= nil then 302 _u6253_u5370("只有 变量x: " .. tostring(_u53d8_u91cfx))
303 _match_0 = true
304 _u6253_u5370("变量x: " .. tostring(_u53d8_u91cfx) .. " 和 变量y: " .. tostring(_u53d8_u91cfy))
305 end
306 end
307 if not _match_0 then
308 if _tab_0 then
309 local _u53d8_u91cfx = _u8868_u683c["变量x"]
310 if _u53d8_u91cfx ~= nil then
311 _u6253_u5370("只有 变量x: " .. tostring(_u53d8_u91cfx))
312 end
313 end 303 end
314 end 304 end
315 end 305 end
316end 306end
317do 307do
318 local _u5339_u914d 308 local _u5339_u914d
319 do 309 local _exp_0 = _u8868_u683c
320 local _exp_0 = _u8868_u683c 310 if 1 == _exp_0 then
321 if 1 == _exp_0 then 311 _u5339_u914d = "1"
322 _u5339_u914d = "1" 312 else
323 else 313 local _type_0 = type(_exp_0)
324 local _type_0 = type(_exp_0) 314 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
325 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 315 local _match_0 = false
326 local _match_0 = false 316 if _tab_0 then
327 if _tab_0 then 317 local _u53d8_u91cfx = _exp_0["变量x"]
328 local _u53d8_u91cfx = _exp_0["变量x"] 318 if _u53d8_u91cfx ~= nil then
329 if _u53d8_u91cfx ~= nil then 319 _match_0 = true
330 _match_0 = true 320 _u5339_u914d = _u53d8_u91cfx
331 _u5339_u914d = _u53d8_u91cfx
332 end
333 end 321 end
334 if not _match_0 then 322 end
335 if false == _exp_0 then 323 if not _match_0 then
336 _u5339_u914d = "false" 324 if false == _exp_0 then
337 else 325 _u5339_u914d = "false"
338 _u5339_u914d = nil 326 else
339 end 327 _u5339_u914d = nil
340 end 328 end
341 end 329 end
342 end 330 end
@@ -346,55 +334,51 @@ do
346 if nil == _exp_0 then 334 if nil == _exp_0 then
347 return "无效" 335 return "无效"
348 else 336 else
349 do 337 local _type_0 = type(_exp_0)
350 local _type_0 = type(_exp_0) 338 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
351 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 339 local _match_0 = false
352 local _match_0 = false 340 if _tab_0 then
353 if _tab_0 then 341 local _u53d8_u91cfa = _exp_0["变量a"]
354 local _u53d8_u91cfa = _exp_0["变量a"] 342 local _u53d8_u91cfb = _exp_0["变量b"]
355 local _u53d8_u91cfb = _exp_0["变量b"] 343 if _u53d8_u91cfa ~= nil and _u53d8_u91cfb ~= nil then
356 if _u53d8_u91cfa ~= nil and _u53d8_u91cfb ~= nil then 344 _match_0 = true
357 _match_0 = true 345 return tostring(_u53d8_u91cfa + _u53d8_u91cfb)
358 return tostring(_u53d8_u91cfa + _u53d8_u91cfb)
359 end
360 end 346 end
361 if not _match_0 then 347 end
362 if 1 == _exp_0 or 2 == _exp_0 or 3 == _exp_0 or 4 == _exp_0 or 5 == _exp_0 then 348 if not _match_0 then
363 return "数字 1 - 5" 349 if 1 == _exp_0 or 2 == _exp_0 or 3 == _exp_0 or 4 == _exp_0 or 5 == _exp_0 then
364 else 350 return "数字 1 - 5"
365 local _match_1 = false 351 else
366 if _tab_0 then 352 local _match_1 = false
367 local _u5339_u914d_u4efb_u4f55_u8868_u683c = _exp_0["匹配任何表格"] 353 if _tab_0 then
368 if _u5339_u914d_u4efb_u4f55_u8868_u683c == nil then 354 local _u5339_u914d_u4efb_u4f55_u8868_u683c = _exp_0["匹配任何表格"]
369 _u5339_u914d_u4efb_u4f55_u8868_u683c = "后备" 355 if _u5339_u914d_u4efb_u4f55_u8868_u683c == nil then
370 end 356 _u5339_u914d_u4efb_u4f55_u8868_u683c = "后备"
371 _match_1 = true
372 return _u5339_u914d_u4efb_u4f55_u8868_u683c
373 end
374 if not _match_1 then
375 return "除非它不是一个表格,否则不应到达这里"
376 end 357 end
358 _match_1 = true
359 return _u5339_u914d_u4efb_u4f55_u8868_u683c
360 end
361 if not _match_1 then
362 return "除非它不是一个表格,否则不应到达这里"
377 end 363 end
378 end 364 end
379 end 365 end
380 end 366 end
381end 367end
382do 368do
383 do 369 local _exp_0 = _u53d8_u91cfy
384 local _exp_0 = _u53d8_u91cfy 370 local _type_0 = type(_exp_0)
385 local _type_0 = type(_exp_0) 371 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
386 local _tab_0 = "table" == _type_0 or "userdata" == _type_0 372 if _tab_0 then
387 if _tab_0 then 373 local _u8868 = (function()
388 local _u8868 = (function() 374 local _obj_0 = _exp_0["变量x"]
389 local _obj_0 = _exp_0["变量x"] 375 if _obj_0 ~= nil then
390 if _obj_0 ~= nil then 376 return getmetatable(_obj_0)
391 return getmetatable(_obj_0)
392 end
393 return nil
394 end)()
395 if _u8868 ~= nil then
396 _u6253_u5370(_u8868)
397 end 377 end
378 return nil
379 end)()
380 if _u8868 ~= nil then
381 _u6253_u5370(_u8868)
398 end 382 end
399 end 383 end
400end 384end
diff --git a/spec/outputs/unicode/syntax.lua b/spec/outputs/unicode/syntax.lua
index f086db6..9ea8f68 100644
--- a/spec/outputs/unicode/syntax.lua
+++ b/spec/outputs/unicode/syntax.lua
@@ -235,15 +235,11 @@ else
235end 235end
236do 236do
237 local _with_0 = _u8868 237 local _with_0 = _u8868
238 do 238 local _obj_2 = _with_0["变量b"]["变量c"]
239 local _obj_2 = _with_0["变量b"]["变量c"] 239 local _with_1 = _u5411_u91cf
240 do 240 _with_1["字段x"] = 1
241 local _with_1 = _u5411_u91cf 241 _with_1["字段y"] = 2
242 _with_1["字段x"] = 1 242 _obj_2[#_obj_2 + 1] = _with_1
243 _with_1["字段y"] = 2
244 _obj_2[#_obj_2 + 1] = _with_1
245 end
246 end
247end 243end
248do 244do
249 local _call_8 = _u5bf9_u8c61a["变量b"]["变量c"]["变量d"] 245 local _call_8 = _u5bf9_u8c61a["变量b"]["变量c"]["变量d"]
diff --git a/spec/outputs/unicode/tables.lua b/spec/outputs/unicode/tables.lua
index 28ad6e2..82ca299 100644
--- a/spec/outputs/unicode/tables.lua
+++ b/spec/outputs/unicode/tables.lua
@@ -392,11 +392,9 @@ do
392 _tab_0[#_tab_0 + 1] = "b" 392 _tab_0[#_tab_0 + 1] = "b"
393 _tab_0[#_tab_0 + 1] = "c" 393 _tab_0[#_tab_0 + 1] = "c"
394 local _obj_1 394 local _obj_1
395 do 395 local _obj_2 = _u51fd_u6570
396 local _obj_2 = _u51fd_u6570 396 if _obj_2 ~= nil then
397 if _obj_2 ~= nil then 397 _obj_1 = _obj_2()
398 _obj_1 = _obj_2()
399 end
400 end 398 end
401 local _idx_1 = 1 399 local _idx_1 = 1
402 for _key_0, _value_0 in pairs(_obj_1) do 400 for _key_0, _value_0 in pairs(_obj_1) do
diff --git a/spec/outputs/unicode/vararg.lua b/spec/outputs/unicode/vararg.lua
index 4acb6cc..b837006 100644
--- a/spec/outputs/unicode/vararg.lua
+++ b/spec/outputs/unicode/vararg.lua
@@ -46,57 +46,53 @@ local _anon_func_5 = function(_u9879_u76ee, ...)
46end 46end
47local _anon_func_6 = function(_u51fd_u6570, setmetatable) 47local _anon_func_6 = function(_u51fd_u6570, setmetatable)
48 local _u53d8_u91cfA 48 local _u53d8_u91cfA
49 do 49 local _class_0
50 local _class_0 50 local _base_0 = { }
51 local _base_0 = { } 51 if _base_0.__index == nil then
52 if _base_0.__index == nil then 52 _base_0.__index = _base_0
53 _base_0.__index = _base_0 53 end
54 _class_0 = setmetatable({
55 __init = function() end,
56 __base = _base_0,
57 __name = "变量A"
58 }, {
59 __index = _base_0,
60 __call = function(cls, ...)
61 local _self_0 = setmetatable({ }, _base_0)
62 cls.__init(_self_0, ...)
63 return _self_0
54 end 64 end
55 _class_0 = setmetatable({ 65 })
56 __init = function() end, 66 _base_0.__class = _class_0
57 __base = _base_0, 67 local self = _class_0;
58 __name = "变量A" 68 _u51fd_u6570()
59 }, { 69 _u53d8_u91cfA = _class_0
60 __index = _base_0, 70 return _class_0
61 __call = function(cls, ...)
62 local _self_0 = setmetatable({ }, _base_0)
63 cls.__init(_self_0, ...)
64 return _self_0
65 end
66 })
67 _base_0.__class = _class_0
68 local self = _class_0;
69 _u51fd_u6570()
70 _u53d8_u91cfA = _class_0
71 return _class_0
72 end
73end 71end
74local _anon_func_7 = function(_u51fd_u6570, setmetatable, ...) 72local _anon_func_7 = function(_u51fd_u6570, setmetatable, ...)
75 local _u53d8_u91cfA 73 local _u53d8_u91cfA
76 do 74 local _class_0
77 local _class_0 75 local _base_0 = { }
78 local _base_0 = { } 76 if _base_0.__index == nil then
79 if _base_0.__index == nil then 77 _base_0.__index = _base_0
80 _base_0.__index = _base_0 78 end
79 _class_0 = setmetatable({
80 __init = function() end,
81 __base = _base_0,
82 __name = "变量A"
83 }, {
84 __index = _base_0,
85 __call = function(cls, ...)
86 local _self_0 = setmetatable({ }, _base_0)
87 cls.__init(_self_0, ...)
88 return _self_0
81 end 89 end
82 _class_0 = setmetatable({ 90 })
83 __init = function() end, 91 _base_0.__class = _class_0
84 __base = _base_0, 92 local self = _class_0;
85 __name = "变量A" 93 _u51fd_u6570(...)
86 }, { 94 _u53d8_u91cfA = _class_0
87 __index = _base_0, 95 return _class_0
88 __call = function(cls, ...)
89 local _self_0 = setmetatable({ }, _base_0)
90 cls.__init(_self_0, ...)
91 return _self_0
92 end
93 })
94 _base_0.__class = _class_0
95 local self = _class_0;
96 _u51fd_u6570(...)
97 _u53d8_u91cfA = _class_0
98 return _class_0
99 end
100end 96end
101local _anon_func_8 = function(_u8868, pairs) 97local _anon_func_8 = function(_u8868, pairs)
102 local _tbl_0 = { } 98 local _tbl_0 = { }
diff --git a/spec/outputs/unicode/with.lua b/spec/outputs/unicode/with.lua
index 0dcd4a7..7a5ba00 100644
--- a/spec/outputs/unicode/with.lua
+++ b/spec/outputs/unicode/with.lua
@@ -9,24 +9,20 @@ do
9 end 9 end
10end 10end
11do 11do
12 do 12 local _with_0 = _u53f6_u5b50
13 local _with_0 = _u53f6_u5b50 13 _with_0["世界"]()
14 _with_0["世界"]() 14 _with_0["世界"](1, 2, 3)
15 _with_0["世界"](1, 2, 3) 15 local _u53d8_u91cfg = _with_0["什么"]["是"]["这"]
16 local _u53d8_u91cfg = _with_0["什么"]["是"]["这"] 16 _with_0["你好"](1, 2, 3)
17 _with_0["你好"](1, 2, 3) 17 _with_0["你好"](_with_0, 1, 2)["世界"](2323)
18 _with_0["你好"](_with_0, 1, 2)["世界"](2323) 18 _with_0["你好"](_with_0, "是的", "伙计")
19 _with_0["你好"](_with_0, "是的", "伙计") 19 _with_0["世界"] = 200
20 _with_0["世界"] = 200
21 end
22end 20end
23do 21do
24 local _u6ecb_u6ecb_u6ecb 22 local _u6ecb_u6ecb_u6ecb
25 do 23 local _with_0 = _u4e1c_u897f
26 local _with_0 = _u4e1c_u897f 24 _with_0["设置状态"]("你好 世界")
27 _with_0["设置状态"]("你好 世界") 25 _u6ecb_u6ecb_u6ecb = _with_0
28 _u6ecb_u6ecb_u6ecb = _with_0
29 end
30end 26end
31do 27do
32 local _u53d8_u91cfx = 5 + (function() 28 local _u53d8_u91cfx = 5 + (function()
@@ -45,14 +41,12 @@ do
45 } 41 }
46end 42end
47do 43do
48 do 44 local _with_0 = _u4e1c_u897f
49 local _with_0 = _u4e1c_u897f 45 local _ = _with_0["属性"](_with_0, "某物")["你好"]
50 local _ = _with_0["属性"](_with_0, "某物")["你好"] 46 local _call_0 = _with_0["属性"]
51 local _call_0 = _with_0["属性"] 47 _call_0["发送"](_call_0, _u4e00_u4e2a)
52 _call_0["发送"](_call_0, _u4e00_u4e2a) 48 local _call_1 = _with_0["属性"]
53 local _call_1 = _with_0["属性"] 49 _call_1["发送"](_call_1, _u4e00_u4e2a)
54 _call_1["发送"](_call_1, _u4e00_u4e2a)
55 end
56end 50end
57do 51do
58 do 52 do
@@ -81,69 +75,49 @@ do
81 return _u53d8_u91cfa 75 return _u53d8_u91cfa
82 end)()) 76 end)())
83 local p 77 local p
84 do 78 local _with_0 = 1
85 local _with_0 = 1 79 _u4f60_u597d()["字段x"], _u4e16_u754c()["字段y"] = _with_0, 2
86 _u4f60_u597d()["字段x"], _u4e16_u754c()["字段y"] = _with_0, 2 80 _u6253_u5370(_u53d8_u91cfa + _u53d8_u91cfb)
87 _u6253_u5370(_u53d8_u91cfa + _u53d8_u91cfb) 81 p = _with_0
88 p = _with_0
89 end
90end 82end
91do 83do
92 local _u53d8_u91cfx = "你好" 84 local _u53d8_u91cfx = "你好"
93 _u53d8_u91cfx["大写"](_u53d8_u91cfx) 85 _u53d8_u91cfx["大写"](_u53d8_u91cfx)
94end 86end
95do 87do
96 do 88 local _u53d8_u91cfk = "乔"
97 local _u53d8_u91cfk = "乔" 89 _u6253_u5370(_u53d8_u91cfk["大写"](_u53d8_u91cfk))
98 _u6253_u5370(_u53d8_u91cfk["大写"](_u53d8_u91cfk))
99 end
100end 90end
101do 91do
102 do 92 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", ""
103 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", "" 93 _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa))
104 _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa))
105 end
106end 94end
107do 95do
108 local _u53d8_u91cfa = "床铺" 96 local _u53d8_u91cfa = "床铺"
109 do 97 local _u53d8_u91cfb, _u53d8_u91cfc
110 local _u53d8_u91cfb, _u53d8_u91cfc 98 _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", ""
111 _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", "" 99 _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa))
112 _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa))
113 end
114end 100end
115do 101do
116 do 102 local _with_0 = _u53d8_u91cfj
117 local _with_0 = _u53d8_u91cfj 103 _u6253_u5370(_with_0["大写"](_with_0))
118 _u6253_u5370(_with_0["大写"](_with_0))
119 end
120end 104end
121do 105do
122 do 106 local _with_0 = "乔"
123 local _with_0 = "乔" 107 _u53d8_u91cfk["变量j"] = _with_0
124 _u53d8_u91cfk["变量j"] = _with_0 108 _u6253_u5370(_with_0["大写"](_with_0))
125 _u6253_u5370(_with_0["大写"](_with_0))
126 end
127end 109end
128do 110do
129 do 111 local _with_0 = _u53d8_u91cfa
130 local _with_0 = _u53d8_u91cfa 112 _u6253_u5370(_with_0.b)
131 _u6253_u5370(_with_0.b) 113 local _with_1 = _with_0.c
132 do 114 _u6253_u5370(_with_1.d)
133 local _with_1 = _with_0.c
134 _u6253_u5370(_with_1.d)
135 end
136 end
137end 115end
138do 116do
139 do 117 local _with_0 = _u53d8_u91cfa
140 local _with_0 = _u53d8_u91cfa 118 local _with_1 = 2
141 do 119 _with_0.b = _with_1
142 local _with_1 = 2 120 _u6253_u5370(_with_1.c)
143 _with_0.b = _with_1
144 _u6253_u5370(_with_1.c)
145 end
146 end
147end 121end
148do 122do
149 local _ 123 local _
@@ -153,44 +127,38 @@ do
153 end 127 end
154end 128end
155do 129do
156 do 130 local _with_0 = _u8868_u683c
157 local _with_0 = _u8868_u683c 131 local _call_0 = _u9879_u76ee["字段"]
158 local _call_0 = _u9879_u76ee["字段"] 132 _with_0.x = _call_0["函数"](_call_0, 123)
159 _with_0.x = _call_0["函数"](_call_0, 123)
160 end
161end 133end
162do 134do
163 do 135 local _with_0 = _u7238_u7238
164 local _with_0 = _u7238_u7238 136 _with_0["如果"]("是的")
165 _with_0["如果"]("是的") 137 local _u53d8_u91cfy = _with_0["结束"]["函数"]
166 local _u53d8_u91cfy = _with_0["结束"]["函数"]
167 end
168end 138end
169do 139do
140 local _with_0 = _u8868_u683c
170 do 141 do
171 local _with_0 = _u8868_u683c 142 local _obj_0 = _with_0[2]
172 do 143 if _obj_0 ~= nil then
173 local _obj_0 = _with_0[2] 144 _with_0[1] = _obj_0["函数"](_obj_0)
174 if _obj_0 ~= nil then
175 _with_0[1] = _obj_0["函数"](_obj_0)
176 end
177 end
178 _with_0["%a-b-c%"] = 123
179 _with_0[ [[x y z]]] = _with_0[_u53d8_u91cf]
180 _u6253_u5370(_with_0[_with_0[3]])
181 do
182 local _with_1 = _with_0[4]
183 _with_1[1] = 1
184 end 145 end
185 _with_0[#_with_0 + 1] = "abc"
186 _with_0[#_with_0 + 1] = {
187 ["类型"] = "你好",
188 {
189 ["名字"] = "xyz",
190 ["值"] = 998
191 }
192 }
193 end 146 end
147 _with_0["%a-b-c%"] = 123
148 _with_0[ [[x y z]]] = _with_0[_u53d8_u91cf]
149 _u6253_u5370(_with_0[_with_0[3]])
150 do
151 local _with_1 = _with_0[4]
152 _with_1[1] = 1
153 end
154 _with_0[#_with_0 + 1] = "abc"
155 _with_0[#_with_0 + 1] = {
156 ["类型"] = "你好",
157 {
158 ["名字"] = "xyz",
159 ["值"] = 998
160 }
161 }
194end 162end
195do 163do
196 do 164 do
@@ -207,16 +175,14 @@ do
207 end 175 end
208end 176end
209do 177do
210 do 178 local _u63a9_u7801 = _u5b9e_u5fc3_u77e9_u5f62({
211 local _u63a9_u7801 = _u5b9e_u5fc3_u77e9_u5f62({ 179 ["宽"] = w,
212 ["宽"] = w, 180 ["高"] = h,
213 ["高"] = h, 181 ["颜色"] = 0x66000000
214 ["颜色"] = 0x66000000 182 })
215 }) 183 if _u63a9_u7801 ~= nil then
216 if _u63a9_u7801 ~= nil then 184 _u63a9_u7801["触摸启用"] = true
217 _u63a9_u7801["触摸启用"] = true 185 _u63a9_u7801["吞噬触摸"] = true
218 _u63a9_u7801["吞噬触摸"] = true
219 end
220 end 186 end
221end 187end
222return nil 188return nil