aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/unicode
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-08-17 10:36:15 +0800
committerLi Jin <dragon-fly@qq.com>2023-08-17 10:36:15 +0800
commite61cce21ef7def2c2e52dd6cb6a5b540ebcac29d (patch)
tree6e7c5e7e6f13157e9f8db26c38f6d8cba75683e5 /spec/outputs/unicode
parent289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (diff)
downloadyuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.gz
yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.bz2
yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.zip
add unicode identifier support, fix more issue from #144
Diffstat (limited to 'spec/outputs/unicode')
-rw-r--r--spec/outputs/unicode/ambiguous.lua114
-rw-r--r--spec/outputs/unicode/assign.lua171
-rw-r--r--spec/outputs/unicode/attrib.lua122
-rw-r--r--spec/outputs/unicode/backcall.lua151
-rw-r--r--spec/outputs/unicode/bubbling.lua123
-rw-r--r--spec/outputs/unicode/class.lua1242
-rw-r--r--spec/outputs/unicode/comprehension.lua276
-rw-r--r--spec/outputs/unicode/cond.lua354
-rw-r--r--spec/outputs/unicode/destructure.lua637
-rw-r--r--spec/outputs/unicode/do.lua48
-rw-r--r--spec/outputs/unicode/existential.lua223
-rw-r--r--spec/outputs/unicode/export.lua338
-rw-r--r--spec/outputs/unicode/export_default.lua19
-rw-r--r--spec/outputs/unicode/funcs.lua222
-rw-r--r--spec/outputs/unicode/global.lua91
-rw-r--r--spec/outputs/unicode/goto.lua67
-rw-r--r--spec/outputs/unicode/import.lua112
-rw-r--r--spec/outputs/unicode/in_expression.lua181
-rw-r--r--spec/outputs/unicode/lists.lua281
-rw-r--r--spec/outputs/unicode/literals.lua36
-rw-r--r--spec/outputs/unicode/local.lua157
-rw-r--r--spec/outputs/unicode/loops.lua337
-rw-r--r--spec/outputs/unicode/macro.lua321
-rw-r--r--spec/outputs/unicode/metatable.lua168
-rw-r--r--spec/outputs/unicode/multiline_chain.lua135
-rw-r--r--spec/outputs/unicode/nil_coalescing.lua182
-rw-r--r--spec/outputs/unicode/operators.lua29
-rw-r--r--spec/outputs/unicode/pipe.lua135
-rw-r--r--spec/outputs/unicode/plus.lua73
-rw-r--r--spec/outputs/unicode/return.lua126
-rw-r--r--spec/outputs/unicode/string.lua53
-rw-r--r--spec/outputs/unicode/stub.lua26
-rw-r--r--spec/outputs/unicode/switch.lua401
-rw-r--r--spec/outputs/unicode/syntax.lua431
-rw-r--r--spec/outputs/unicode/tables.lua594
-rw-r--r--spec/outputs/unicode/try_catch.lua61
-rw-r--r--spec/outputs/unicode/unless_else.lua7
-rw-r--r--spec/outputs/unicode/using.lua30
-rw-r--r--spec/outputs/unicode/vararg.lua301
-rw-r--r--spec/outputs/unicode/whitespace.lua98
-rw-r--r--spec/outputs/unicode/with.lua222
41 files changed, 8695 insertions, 0 deletions
diff --git a/spec/outputs/unicode/ambiguous.lua b/spec/outputs/unicode/ambiguous.lua
new file mode 100644
index 0000000..3783026
--- /dev/null
+++ b/spec/outputs/unicode/ambiguous.lua
@@ -0,0 +1,114 @@
1local _u7ed1_u5b9a = _u6293_u53d6["绑定"];
2(_u7ed1_u5b9a(_u58f0_u660e))({
3 ["颜色"] = "Red"
4})
5local _u53d8_u91cfa = 'b'
6local _u53d8_u91cfc = _u53d8_u91cfd;
7(_u53d8_u91cfa(_u53d8_u91cfb))(_u53d8_u91cfc(_u53d8_u91cfd))
8_u53d8_u91cfc = _u53d8_u91cfd["变量c"];
9(_u53d8_u91cfa(_u53d8_u91cfb))(_u53d8_u91cfc(_u53d8_u91cfd));
10(_u53d8_u91cfc(_u53d8_u91cfd))(_u53d8_u91cfa(_u53d8_u91cfb))
11local _u53d8_u91cfb
12_u53d8_u91cfa, _u53d8_u91cfb = _u53d8_u91cfc, _u53d8_u91cfd;
13(_u53d8_u91cfd(_u53d8_u91cfa))(_u53d8_u91cfc)
14for _u8ba1_u6570 = 1, 10 do
15 _u53d8_u91cfa = function() end
16 (_u6253_u5370)(1)
17 _u53d8_u91cfa = _u53d8_u91cff;
18 (_u6253_u5370)(2)
19 if _u6761_u4ef6 then
20 (_u6253_u5370)(3)
21 end
22 ::_u8df3_u8f6c_u4f4d_u7f6e::;
23 (_u6253_u5370)(4)
24 goto _u8df3_u8f6c_u4f4d_u7f6e;
25 (_u6253_u5370)(5)
26end
27do
28 _u6253_u5370();
29 (a_u53d8_u91cf)(b_u53d8_u91cf(1))
30 _u6253_u5370();
31 (fn)(function() end)
32end
33do
34 _u6253_u5370()
35 _u5f02_u6b65_u51fd_u6570(function()
36 _u6253_u5370();
37--[[a comment to insert]]
38 (haha)()
39 return nil
40 end)
41end
42do
43 _u6253_u5370(123)
44end
45do
46 _u51fd_u6570f({
47 ["v变量"] = v_u53d8_u91cf
48 })
49 local _u6570_u7ec4
50 do
51 local _accum_0 = { }
52 local _len_0 = 1
53 while _u6761_u4ef6f do
54 _accum_0[_len_0] = {
55 ["v变量"] = v_u53d8_u91cf
56 }
57 _len_0 = _len_0 + 1
58 end
59 _u6570_u7ec4 = _accum_0
60 end
61 repeat
62 _u6253_u5370(_u53d8_u91cfv)
63 until _u6761_u4ef6f({
64 ["变量v"] = _u53d8_u91cfv
65 })
66 do
67 local _with_0 = _u6761_u4ef6f
68 local _u53d8_u91cfv = _u6570_u7ec4["变量v"]
69 _with_0["字段x"] = 1
70 end
71 local _u53d8_u91cfx
72 if _u6761_u4ef6f then
73 _u53d8_u91cfx = {
74 ["字段v"] = _u5b57_u6bb5v
75 }
76 end
77 do
78 local _exp_0 = _u6761_u4ef6f({
79 ["字段v"] = _u5b57_u6bb5v
80 })
81 if _u6761_u4ef6f == _exp_0 then
82 _u53d8_u91cfx = {
83 ["字段v"] = _u5b57_u6bb5v
84 }
85 end
86 end
87 local _u6570_u5b57_u6570_u7ec4
88 do
89 local _accum_0 = { }
90 local _len_0 = 1
91 for _u6570_u5b57 = 1, _u957f_u5ea6 do
92 _accum_0[_len_0] = {
93 ["数字"] = _u6570_u5b57
94 }
95 _len_0 = _len_0 + 1
96 end
97 _u6570_u5b57_u6570_u7ec4 = _accum_0
98 end
99 local _u5bf9_u8c61_u6570_u7ec4
100 do
101 local _accum_0 = { }
102 local _len_0 = 1
103 local _list_0 = _u7269_u4ef6_u6570_u7ec4
104 for _index_0 = 1, #_list_0 do
105 local _u7269_u4ef6 = _list_0[_index_0]
106 _accum_0[_len_0] = {
107 ["名称"] = _u7269_u4ef6
108 }
109 _len_0 = _len_0 + 1
110 end
111 _u5bf9_u8c61_u6570_u7ec4 = _accum_0
112 end
113end
114return nil
diff --git a/spec/outputs/unicode/assign.lua b/spec/outputs/unicode/assign.lua
new file mode 100644
index 0000000..b530093
--- /dev/null
+++ b/spec/outputs/unicode/assign.lua
@@ -0,0 +1,171 @@
1local __u65e0_u6548_u53d8_u91cf
2__u65e0_u6548_u53d8_u91cf = function()
3 local joop_u53d8_u91cf = 2302
4 return function(_u597d)
5 local _u53d8_u91cfd = 100
6 _u597d = 1021
7 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc
8 _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd = 1, 2, 3, 4
9 local _u4f60_u597d
10 _u4f60_u597d[232], (5 + 5)[121], _u4f60_u597d, _u53d8_u91cfx[99] = 100, 200, 300, 400
11 joop_u53d8_u91cf = 12
12 end
13end
14local joop_u53d8_u91cf = 2345
15local _u53d8_u91cfa, _u53d8_u91cfb
16if _u4f60_u597d then
17 _u53d8_u91cfa, _u53d8_u91cfb = "你好", nil
18else
19 _u53d8_u91cfa, _u53d8_u91cfb = "没啥", "✌️"
20end
21if _u4f60_u597d then
22 if _u270c_ufe0f then
23 _u53d8_u91cfa, _u53d8_u91cfb = "一", "二"
24 else
25 _u53d8_u91cfa, _u53d8_u91cfb = "mmhh", nil
26 end
27else
28 _u6253_u5370("其它东西")
29 _u53d8_u91cfa, _u53d8_u91cfb = "没啥事", "✌️"
30end
31local _u53d8_u91cfc, _u53d8_u91cfd
32if true then
33 _u53d8_u91cfc, _u53d8_u91cfd = 1, 2
34end
35local _u53d8_u91cfx
36do
37 local _u51fd_u6570 = _u83b7_u53d6_u5904_u7406_u51fd_u6570()
38 if _u51fd_u6570 then
39 do
40 _u51fd_u6570()
41 _u53d8_u91cfx = 123
42 end
43 end
44end
45return __u65e0_u6548_u53d8_u91cf(function()
46 setmetatable(a_u53d8_u91cf, (function()
47 _u6253_u5370(123)
48 return { }
49 end)())
50 do
51 local _u5143_u7d20a, _u5143_u7d20b
52 do
53 local _exp_0 = _u5bf9_u8c61c
54 if "a" == _exp_0 then
55 do
56 local _obj_0 = _u5b57_u5178
57 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2]
58 end
59 elseif "b" == _exp_0 then
60 do
61 local _obj_0 = _u51fd_u6570()
62 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2]
63 end
64 end
65 end
66 end
67 do
68 local _obj_0 = a_u6570_u7ec4
69 if _u6761_u4ef6x then
70 _obj_0[#_obj_0 + 1] = 1
71 else
72 _obj_0[#_obj_0 + 1] = 2
73 end
74 end
75 do
76 local _u53d8_u91cfa
77 if x_u6761_u4ef6 then
78 do
79 local _exp_0 = _u5bf9_u8c61y
80 if 1 == _exp_0 then
81 do
82 local _obj_0, _obj_1 = _u51fd_u6570()
83 _u53d8_u91cfb[#_u53d8_u91cfb + 1] = _obj_1
84 _u53d8_u91cfa = _obj_0
85 end
86 end
87 end
88 end
89 end
90 do
91 local _u53d8_u91cfa
92 local _u5143_u7d20b
93 if x_u6761_u4ef6 then
94 do
95 local _obj_0, _obj_1 = _u51fd_u6570()
96 _u53d8_u91cfa = _obj_0
97 _u5143_u7d20b = _obj_1[1]
98 end
99 else
100 _u53d8_u91cfa = 123
101 _u5143_u7d20b = _u8868[1]
102 end
103 end
104 do
105 local _u53d8_u91cfa, _u5bf9_u8c61c
106 if _u6761_u4ef6x then
107 do
108 local _exp_0 = _u5bf9_u8c61y
109 if 1 == _exp_0 then
110 do
111 local _obj_0, _obj_1, _obj_2, _obj_3 = _u51fd_u6570()
112 do
113 local _obj_4 = _u6570_u7ec4b
114 _obj_4[#_obj_4 + 1] = _obj_1
115 end
116 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = _obj_0, _obj_2, _obj_3
117 end
118 end
119 end
120 elseif _u6761_u4ef6x2 then
121 if _u6761_u4ef6y2 then
122 do
123 local _obj_0, _obj_1, _obj_2, _obj_3 = _u51fd_u65701()
124 do
125 local _obj_4 = _u6570_u7ec4b
126 _obj_4[#_obj_4 + 1] = _obj_1
127 end
128 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = _obj_0, _obj_2, _obj_3
129 end
130 end
131 else
132 _u6253_u5370("hello")
133 do
134 _u6253_u5370(123)
135 do
136 local _obj_0, _obj_1, _obj_2 = _u51fd_u65702()
137 do
138 local _obj_3 = _u6570_u7ec4b
139 _obj_3[#_obj_3 + 1] = _obj_0
140 end
141 _u53d8_u91cfa, _u5bf9_u8c61c, getmetatable(_u5bf9_u8c61d).__add = 1, _obj_1, _obj_2
142 end
143 end
144 end
145 end
146 do
147 local _u53d8_u91cfa = 0
148 local _u53d8_u91cfb = 0
149 local _u53d8_u91cfc = 0
150 local _u53d8_u91cfd = 0
151 end
152 do
153 local a_u53d8_u91cf = _u51fd_u6570()
154 local b_u53d8_u91cf = a_u53d8_u91cf
155 local c_u53d8_u91cf = a_u53d8_u91cf
156 local d_u53d8_u91cf = a_u53d8_u91cf
157 end
158 do
159 local _u53d8_u91cfe = _u6570_u7ec4_u5bf9_u8c61
160 local a_u5143_u7d20 = _u53d8_u91cfe[1]
161 local _u5b57_u6bb5b = _u53d8_u91cfe["字段b"]
162 _u5bf9_u8c61c["字段d"] = _u53d8_u91cfe
163 end
164 do
165 local _u503c = 123
166 local _u53d8_u91cfa = _u503c
167 local _u53d8_u91cfb = _u503c
168 local _u53d8_u91cfc = _u503c
169 end
170 return nil
171end)
diff --git a/spec/outputs/unicode/attrib.lua b/spec/outputs/unicode/attrib.lua
new file mode 100644
index 0000000..0f60451
--- /dev/null
+++ b/spec/outputs/unicode/attrib.lua
@@ -0,0 +1,122 @@
1local _u5e38_u91cfa <const>, _u5e38_u91cfb <const>, _u5e38_u91cfc <const>, _u5e38_u91cfd <const> = 1, 2, 3, 4
2do
3 local _u5173_u95ed_u53d8_u91cfa, _u5173_u95ed_u53d8_u91cfb = setmetatable({ }, {
4 __close = function(self)
5 return _u6253_u5370("已关闭")
6 end
7 })
8 local _close_0 <close> = _u5173_u95ed_u53d8_u91cfa
9 local _close_1 <close> = _u5173_u95ed_u53d8_u91cfb
10 local _u53d8_u91cfc <const>, _u5e38_u91cfd <const> = 123, 'abc'
11 close(_u5e38_u91cfa, _u5e38_u91cfb)
12 const(_u5e38_u91cfc, _u5e38_u91cfd)
13end
14do
15 local _u5e38_u91cfa <const> = _u51fd_u6570()
16 local _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d
17 do
18 local _obj_0, _obj_1 = _u51fd_u65701()
19 _u5143_u7d20b, _u5143_u7d20c = _obj_0[1], _obj_0[2]
20 _u5143_u7d20d = _obj_1[1]
21 end
22end
23do
24 local _u5e38_u91cfa, _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d
25 do
26 local _obj_0, _obj_1, _obj_2 = _u51fd_u6570()
27 _u5e38_u91cfa = _obj_0
28 _u5143_u7d20b, _u5143_u7d20c = _obj_1[1], _obj_1[2]
29 _u5143_u7d20d = _obj_2[1]
30 end
31end
32do
33 local _u5173_u95ed_u53d8_u91cfv <close> = (function()
34 if _u6807_u8bb0_u4e3a_u771f then
35 return _u51fd_u6570_u8c03_u7528()
36 else
37 return setmetatable({ }, {
38 __close = function(self) end
39 })
40 end
41 end)()
42 local _u5173_u95ed_u53d8_u91cff <close> = (function()
43 local _with_0 = io.open("文件.txt")
44 _with_0:write("你好")
45 return _with_0
46 end)()
47end
48do
49 local _u5e38_u91cfa <const> = (function()
50 if true then
51 return 1
52 end
53 end)()
54 local _u5173_u95ed_u53d8_u91cfb <close> = (function()
55 if not false then
56 if _u6761_u4ef6x then
57 return 1
58 end
59 end
60 end)()
61 local _u5e38_u91cfc <const> = (function()
62 if true then
63 local _exp_0 = _u6761_u4ef6x
64 if "abc" == _exp_0 then
65 return 998
66 end
67 end
68 end)()
69 local _u5173_u95ed_u53d8_u91cfd <close> = (function()
70 if (function()
71 local _exp_0 = _u6761_u4ef6a
72 if _exp_0 ~= nil then
73 return _exp_0
74 else
75 return _u6761_u4ef6b
76 end
77 end)() then
78 return {
79 ["数值"] = _u6570_u503c
80 }
81 end
82 end)()
83end
84do
85 local __u65e0_u6548_u53d8_u91cf <close> = (function()
86 local _with_0 = io.open("文件.txt")
87 _with_0:write("你好")
88 return _with_0
89 end)()
90 local __u65e0_u6548_u53d8_u91cf <close> = setmetatable({ }, {
91 __close = function()
92 return _u6253_u5370("第二")
93 end
94 })
95 local __u65e0_u6548_u53d8_u91cf <close> = setmetatable({ }, {
96 __close = function()
97 return _u6253_u5370("第一")
98 end
99 })
100end
101local __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4 = setmetatable({ }, {
102 __close = function(self)
103 self[#self]()
104 self[#self] = nil
105 end
106})
107local _u5ef6_u8fdf
108_u5ef6_u8fdf = function(_u9879_u76ee)
109 __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4[#__u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4 + 1] = _u9879_u76ee
110 return __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4
111end
112do
113 local __u65e0_u6548_u53d8_u91cf <close> = _u5ef6_u8fdf(function()
114 return _u6253_u5370(3)
115 end)
116 local __u65e0_u6548_u53d8_u91cf <close> = _u5ef6_u8fdf(function()
117 return _u6253_u5370(2)
118 end)
119 local __u65e0_u6548_u53d8_u91cf <close> = _u5ef6_u8fdf(function()
120 return _u6253_u5370(1)
121 end)
122end
diff --git a/spec/outputs/unicode/backcall.lua b/spec/outputs/unicode/backcall.lua
new file mode 100644
index 0000000..91dfdff
--- /dev/null
+++ b/spec/outputs/unicode/backcall.lua
@@ -0,0 +1,151 @@
1do
2 _u6620_u5c04({
3 1,
4 2,
5 3
6 }, function(_u9879_u76ee)
7 return _u9879_u76ee * 2
8 end)
9end
10do
11 _u6620_u5c04(function(_u9879_u76ee)
12 return _u9879_u76ee * 2
13 end, {
14 1,
15 2,
16 3
17 })
18end
19do
20 _u8fc7_u6ee4(function(_u9879_u76ee)
21 return _u9879_u76ee > 2
22 end, (function()
23 return _u6620_u5c04(function(_u9879_u76ee)
24 return _u9879_u76ee * 2
25 end, {
26 1,
27 2,
28 3,
29 4
30 })
31 end)())
32end
33do
34 do
35 local _obj_0 = _u7f51_u7edc
36 if _obj_0 ~= nil then
37 _obj_0["获取"]("测试地址", function(_u6570_u636e)
38 local _call_0 = _u7f51_u9875_u4f53[".结果"]
39 _call_0["网页"](_call_0, _u6570_u636e)
40 return _u7f51_u7edc["请求"]("测试地址", _u6570_u636e, function(_u662f_u5426_u5904_u7406_u6210_u529f)
41 local _call_1 = _u7f51_u9875_u4f53[".结果"]
42 _call_1["添加"](_call_1, _u662f_u5426_u5904_u7406_u6210_u679c)
43 return _u8bbe_u7f6e_u8d85_u65f6_u56de_u8c03(1000, function()
44 return _u6253_u5370("完成")
45 end)
46 end)
47 end)
48 end
49 end
50end
51do
52 _u540c_u6b65_u72b6_u6001(function()
53 return _u5f02_u6b65_u52a0_u8f7d("文件.yue", function(_u9519_u8bef_u4fe1_u606f, _u6570_u636e)
54 if _u6570_u636e == nil then
55 _u6570_u636e = "nil"
56 end
57 if _u9519_u8bef_u4fe1_u606f then
58 _u6253_u5370(_u9519_u8bef_u4fe1_u606f)
59 return
60 end
61 return _u5f02_u6b65_u7f16_u8bd1(_u6570_u636e, function(_u4ee3_u7801)
62 local _u7ed3_u679c_u51fd_u6570 = _u52a0_u8f7d_u5b57_u7b26_u4e32(_u4ee3_u7801)
63 return _u7ed3_u679c_u51fd_u6570()
64 end)
65 end)
66 end)
67end
68do
69 _u51fd_u65701(function()
70 return _u51fd_u65702(function()
71 do
72 _u51fd_u65703(function()
73 return _u51fd_u65704(function() end)
74 end)
75 end
76 return _u51fd_u65705(function()
77 return _u51fd_u65706(function()
78 return _u51fd_u65707()
79 end)
80 end)
81 end)
82 end)
83end
84do
85 local _u7ed3_u679c, _u6d88_u606f
86 do
87 do
88 local _obj_0 = _u5f02_u6b65_u63a5_u6536("文件名.txt", function(_u6570_u636e)
89 _u6253_u5370(_u6570_u636e)
90 return _u5f02_u6b65_u5904_u7406(_u6570_u636e, function(_u4fe1_u606f)
91 return _u68c0_u67e5(_u4fe1_u606f)
92 end)
93 end)
94 _u7ed3_u679c, _u6d88_u606f = _obj_0["结果"], _obj_0["消息"]
95 end
96 end
97 _u6253_u5370(_u7ed3_u679c, _u6d88_u606f)
98 local _u603b_u5927_u5c0f = _u5408_u5e76(((function()
99 local _accum_0 = { }
100 local _len_0 = 1
101 local _list_0 = _u6587_u4ef6_u6570_u7ec4
102 for _index_0 = 1, #_list_0 do
103 local _u6587_u4ef6 = _list_0[_index_0]
104 _accum_0[_len_0] = _u5f02_u6b65_u52a0_u8f7d(_u6587_u4ef6, function(_u6570_u636e)
105 return _u52a0_u5165_u7f13_u5b58(_u6587_u4ef6, _u6570_u636e)
106 end)
107 _len_0 = _len_0 + 1
108 end
109 return _accum_0
110 end)()), 0, function(_u5bf9_u8c61a, _u5bf9_u8c61b)
111 return _u5bf9_u8c61a + _u5bf9_u8c61b
112 end)
113end
114local _u5c5e_u6027A
115do
116 _u5c5e_u6027A = _u5c5e_u6027_u5b9a_u4e49(function(self)
117 return self["_值"]
118 end, function(self, _u503c)
119 _u6253_u5370("之前值: " .. tostring(self["_值"]))
120 _u6253_u5370("最新值: " .. tostring(_u503c))
121 self["_值"] = _u503c
122 end)
123end
124local _u5c5e_u6027B
125do
126 _u5c5e_u6027B = _u5c5e_u6027_u5b9a_u4e49(function(self)
127 return self["_值"]
128 end, function(self, _u503c)
129 _u6253_u5370("之前值: " .. tostring(self["_值"]))
130 _u6253_u5370("最新值: " .. tostring(_u503c))
131 self["_值"] = _u503c
132 end)
133end
134_u8b66_u544a("嗨")
135local _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz
136do
137 _u53d8_u91cfx = (_u53d8_u91cfa) < -_u53d8_u91cfb
138end
139do
140 _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz = _u53d8_u91cfb(function(_u53d8_u91cfa) end)
141end
142do
143 _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz = _u53d8_u91cfb(function(_u53d8_u91cfa) end)
144end
145do
146 _u53d8_u91cfx = _u53d8_u91cfa <= _u53d8_u91cfb
147end
148do
149 _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz = _u53d8_u91cfb(function(self, _u53d8_u91cfa) end)
150end
151return nil
diff --git a/spec/outputs/unicode/bubbling.lua b/spec/outputs/unicode/bubbling.lua
new file mode 100644
index 0000000..cb8750d
--- /dev/null
+++ b/spec/outputs/unicode/bubbling.lua
@@ -0,0 +1,123 @@
1local _u51fd_u6570
2_u51fd_u6570 = function(...)
3 return #{
4 ...
5 }
6end
7local _u4e0d_u8981_u5192_u6ce1
8_u4e0d_u8981_u5192_u6ce1 = function()
9 local _accum_0 = { }
10 local _len_0 = 1
11 for _u5143_u7d20 in (function(...)
12 return _u6253_u5370(...)
13 end)("你好") do
14 _accum_0[_len_0] = _u5143_u7d20
15 _len_0 = _len_0 + 1
16 end
17 return _accum_0
18end
19local _u53d8_u91cfk
20do
21 local _accum_0 = { }
22 local _len_0 = 1
23 for _u5143_u7d20 in (function(...)
24 return _u6253_u5370(...)
25 end)("你好") do
26 _accum_0[_len_0] = _u5143_u7d20
27 _len_0 = _len_0 + 1
28 end
29 _u53d8_u91cfk = _accum_0
30end
31local _u53d8_u91cfj
32do
33 local _accum_0 = { }
34 local _len_0 = 1
35 for _u8ba1_u6570 = 1, 10 do
36 _accum_0[_len_0] = function(...)
37 return _u6253_u5370(...)
38 end
39 _len_0 = _len_0 + 1
40 end
41 _u53d8_u91cfj = _accum_0
42end
43local _u53d8_u91cfm
44_u53d8_u91cfm = function(...)
45 local _accum_0 = { }
46 local _len_0 = 1
47 local _list_0 = {
48 ...
49 }
50 for _index_0 = 1, #_list_0 do
51 local _u5143_u7d20 = _list_0[_index_0]
52 if _u51fd_u6570(...) > 4 then
53 _accum_0[_len_0] = _u5143_u7d20
54 _len_0 = _len_0 + 1
55 end
56 end
57 return _accum_0
58end
59local __u65e0_u6548_u53d8_u91cf
60__u65e0_u6548_u53d8_u91cf = function(...)
61 local _u6570_u7ec4x
62 do
63 local _accum_0 = { }
64 local _len_0 = 1
65 local _list_0 = {
66 ...
67 }
68 for _index_0 = 1, #_list_0 do
69 local _u8ba1_u6570 = _list_0[_index_0]
70 _accum_0[_len_0] = _u8ba1_u6570
71 _len_0 = _len_0 + 1
72 end
73 _u6570_u7ec4x = _accum_0
74 end
75 local _u6570_u7ec4y
76 do
77 local _accum_0 = { }
78 local _len_0 = 1
79 local _list_0 = {
80 ...
81 }
82 for _index_0 = 1, #_list_0 do
83 local _u5143_u7d20 = _list_0[_index_0]
84 _accum_0[_len_0] = _u5143_u7d20
85 _len_0 = _len_0 + 1
86 end
87 _u6570_u7ec4y = _accum_0
88 end
89 local _u6570_u7ec4z
90 do
91 local _accum_0 = { }
92 local _len_0 = 1
93 for _u5143_u7d20 in _u5217_u8868 do
94 if _u51fd_u6570(...) > 4 then
95 _accum_0[_len_0] = _u5143_u7d20
96 _len_0 = _len_0 + 1
97 end
98 end
99 _u6570_u7ec4z = _accum_0
100 end
101 local _u6570_u7ec4a
102 do
103 local _accum_0 = { }
104 local _len_0 = 1
105 for _u8ba1_u6570 = 1, 10 do
106 _accum_0[_len_0] = ...
107 _len_0 = _len_0 + 1
108 end
109 _u6570_u7ec4a = _accum_0
110 end
111 local _u6570_u7ec4b
112 do
113 local _accum_0 = { }
114 local _len_0 = 1
115 for _u8ba1_u6570 = 1, 10 do
116 _accum_0[_len_0] = function(...)
117 return _u6253_u5370(...)
118 end
119 _len_0 = _len_0 + 1
120 end
121 _u6570_u7ec4b = _accum_0
122 end
123end
diff --git a/spec/outputs/unicode/class.lua b/spec/outputs/unicode/class.lua
new file mode 100644
index 0000000..4d309e3
--- /dev/null
+++ b/spec/outputs/unicode/class.lua
@@ -0,0 +1,1242 @@
1local _u4f60_u597d
2do
3 local _class_0
4 local _base_0 = {
5 ["你好"] = function(self)
6 return _u6253_u5370(self["测试"], self["世界"])
7 end,
8 __tostring = function(self)
9 return "你好 世界"
10 end
11 }
12 if _base_0.__index == nil then
13 _base_0.__index = _base_0
14 end
15 _class_0 = setmetatable({
16 __init = function(self, _u6d4b_u8bd5, _u4e16_u754c)
17 self["测试"] = _u6d4b_u8bd5
18 self["世界"] = _u4e16_u754c
19 return _u6253_u5370("创建对象..")
20 end,
21 __base = _base_0,
22 __name = "你好"
23 }, {
24 __index = _base_0,
25 __call = function(cls, ...)
26 local _self_0 = setmetatable({ }, _base_0)
27 cls.__init(_self_0, ...)
28 return _self_0
29 end
30 })
31 _base_0.__class = _class_0
32 _u4f60_u597d = _class_0
33end
34local _u5bf9_u8c61x = _u4f60_u597d(1, 2)
35_u5bf9_u8c61x["你好"](_u5bf9_u8c61x)
36_u6253_u5370(_u5bf9_u8c61x)
37local _u7b80_u5355
38do
39 local _class_0
40 local _base_0 = {
41 ["酷"] = function(self)
42 return _u6253_u5370("酷")
43 end
44 }
45 if _base_0.__index == nil then
46 _base_0.__index = _base_0
47 end
48 _class_0 = setmetatable({
49 __init = function() end,
50 __base = _base_0,
51 __name = "简单"
52 }, {
53 __index = _base_0,
54 __call = function(cls, ...)
55 local _self_0 = setmetatable({ }, _base_0)
56 cls.__init(_self_0, ...)
57 return _self_0
58 end
59 })
60 _base_0.__class = _class_0
61 _u7b80_u5355 = _class_0
62end
63local _u4f0a_u514b_u65af
64do
65 local _class_0
66 local _parent_0 = _u7b80_u5355
67 local _base_0 = { }
68 for _key_0, _val_0 in pairs(_parent_0.__base) do
69 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
70 _base_0[_key_0] = _val_0
71 end
72 end
73 if _base_0.__index == nil then
74 _base_0.__index = _base_0
75 end
76 setmetatable(_base_0, _parent_0.__base)
77 _class_0 = setmetatable({
78 __init = function(self)
79 return _u6253_u5370("你好已创建")
80 end,
81 __base = _base_0,
82 __name = "伊克斯",
83 __parent = _parent_0
84 }, {
85 __index = function(cls, name)
86 local val = rawget(_base_0, name)
87 if val == nil then
88 local parent = rawget(cls, "__parent")
89 if parent then
90 return parent[name]
91 end
92 else
93 return val
94 end
95 end,
96 __call = function(cls, ...)
97 local _self_0 = setmetatable({ }, _base_0)
98 cls.__init(_self_0, ...)
99 return _self_0
100 end
101 })
102 _base_0.__class = _class_0
103 if _parent_0.__inherited then
104 _parent_0.__inherited(_parent_0, _class_0)
105 end
106 _u4f0a_u514b_u65af = _class_0
107end
108local x_u5bf9_u8c61 = _u4f0a_u514b_u65af()
109x_u5bf9_u8c61["酷"](x_u5bf9_u8c61)
110local _u55e8
111do
112 local _class_0
113 local _base_0 = {
114 ["酷"] = function(self, _u6570_u503c)
115 return _u6253_u5370("数值", _u6570_u503c)
116 end
117 }
118 if _base_0.__index == nil then
119 _base_0.__index = _base_0
120 end
121 _class_0 = setmetatable({
122 __init = function(self, _u53c2_u6570)
123 return _u6253_u5370("初始化参数", _u53c2_u6570)
124 end,
125 __base = _base_0,
126 __name = "嗨"
127 }, {
128 __index = _base_0,
129 __call = function(cls, ...)
130 local _self_0 = setmetatable({ }, _base_0)
131 cls.__init(_self_0, ...)
132 return _self_0
133 end
134 })
135 _base_0.__class = _class_0
136 _u55e8 = _class_0
137end
138do
139 local _class_0
140 local _parent_0 = _u55e8
141 local _base_0 = {
142 ["酷"] = function(self)
143 return _class_0.__parent.__base["酷"](self, 120302)
144 end
145 }
146 for _key_0, _val_0 in pairs(_parent_0.__base) do
147 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
148 _base_0[_key_0] = _val_0
149 end
150 end
151 if _base_0.__index == nil then
152 _base_0.__index = _base_0
153 end
154 setmetatable(_base_0, _parent_0.__base)
155 _class_0 = setmetatable({
156 __init = function(self)
157 return _class_0.__parent.__init(self, "伙计")
158 end,
159 __base = _base_0,
160 __name = "简单",
161 __parent = _parent_0
162 }, {
163 __index = function(cls, name)
164 local val = rawget(_base_0, name)
165 if val == nil then
166 local parent = rawget(cls, "__parent")
167 if parent then
168 return parent[name]
169 end
170 else
171 return val
172 end
173 end,
174 __call = function(cls, ...)
175 local _self_0 = setmetatable({ }, _base_0)
176 cls.__init(_self_0, ...)
177 return _self_0
178 end
179 })
180 _base_0.__class = _class_0
181 if _parent_0.__inherited then
182 _parent_0.__inherited(_parent_0, _class_0)
183 end
184 _u7b80_u5355 = _class_0
185end
186x_u5bf9_u8c61 = _u7b80_u5355()
187x_u5bf9_u8c61["酷"](x_u5bf9_u8c61)
188_u6253_u5370(x_u5bf9_u8c61.__class == _u7b80_u5355)
189local _u597d_u5427
190do
191 local _class_0
192 local _base_0 = {
193 ["一些东西"] = 20323
194 }
195 if _base_0.__index == nil then
196 _base_0.__index = _base_0
197 end
198 _class_0 = setmetatable({
199 __init = function() end,
200 __base = _base_0,
201 __name = "好吧"
202 }, {
203 __index = _base_0,
204 __call = function(cls, ...)
205 local _self_0 = setmetatable({ }, _base_0)
206 cls.__init(_self_0, ...)
207 return _self_0
208 end
209 })
210 _base_0.__class = _class_0
211 _u597d_u5427 = _class_0
212end
213local _u597d_u54d2
214do
215 local _class_0
216 local _parent_0 = _u597d_u5427
217 local _base_0 = {
218 ["一些东西"] = function(self)
219 _class_0.__parent.__base["一些东西"](self, 1, 2, 3, 4)
220 _class_0.__parent["一些东西"](_u53e6_u4e00_u4e2a_u81ea_u5df1, 1, 2, 3, 4)
221 return _u65ad_u8a00(_class_0.__parent == _u597d_u5427)
222 end
223 }
224 for _key_0, _val_0 in pairs(_parent_0.__base) do
225 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
226 _base_0[_key_0] = _val_0
227 end
228 end
229 if _base_0.__index == nil then
230 _base_0.__index = _base_0
231 end
232 setmetatable(_base_0, _parent_0.__base)
233 _class_0 = setmetatable({
234 __init = function(self, ...)
235 return _class_0.__parent.__init(self, ...)
236 end,
237 __base = _base_0,
238 __name = "好哒",
239 __parent = _parent_0
240 }, {
241 __index = function(cls, name)
242 local val = rawget(_base_0, name)
243 if val == nil then
244 local parent = rawget(cls, "__parent")
245 if parent then
246 return parent[name]
247 end
248 else
249 return val
250 end
251 end,
252 __call = function(cls, ...)
253 local _self_0 = setmetatable({ }, _base_0)
254 cls.__init(_self_0, ...)
255 return _self_0
256 end
257 })
258 _base_0.__class = _class_0
259 if _parent_0.__inherited then
260 _parent_0.__inherited(_parent_0, _class_0)
261 end
262 _u597d_u54d2 = _class_0
263end
264local _u597d
265do
266 local _class_0
267 local _base_0 = {
268 ["不错"] = function(self)
269 local _call_0 = _class_0.__parent
270 return _call_0["一些东西"](_call_0, self, 1, 2, 3, 4)
271 end
272 }
273 if _base_0.__index == nil then
274 _base_0.__index = _base_0
275 end
276 _class_0 = setmetatable({
277 __init = function() end,
278 __base = _base_0,
279 __name = "好"
280 }, {
281 __index = _base_0,
282 __call = function(cls, ...)
283 local _self_0 = setmetatable({ }, _base_0)
284 cls.__init(_self_0, ...)
285 return _self_0
286 end
287 })
288 _base_0.__class = _class_0
289 _u597d = _class_0
290end
291local _u4ec0_u4e48
292do
293 local _class_0
294 local _base_0 = {
295 ["一些东西"] = function(self)
296 return _u6253_u5370("值:", self["值"])
297 end
298 }
299 if _base_0.__index == nil then
300 _base_0.__index = _base_0
301 end
302 _class_0 = setmetatable({
303 __init = function() end,
304 __base = _base_0,
305 __name = "什么"
306 }, {
307 __index = _base_0,
308 __call = function(cls, ...)
309 local _self_0 = setmetatable({ }, _base_0)
310 cls.__init(_self_0, ...)
311 return _self_0
312 end
313 })
314 _base_0.__class = _class_0
315 _u4ec0_u4e48 = _class_0
316end
317do
318 local _class_0
319 local _parent_0 = _u4ec0_u4e48
320 local _base_0 = {
321 ["值"] = 2323,
322 ["一些东西"] = function(self)
323 local _base_1 = _class_0.__parent
324 local _fn_0 = _base_1["一些东西"]
325 return _fn_0 and function(...)
326 return _fn_0(_base_1, ...)
327 end
328 end
329 }
330 for _key_0, _val_0 in pairs(_parent_0.__base) do
331 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
332 _base_0[_key_0] = _val_0
333 end
334 end
335 if _base_0.__index == nil then
336 _base_0.__index = _base_0
337 end
338 setmetatable(_base_0, _parent_0.__base)
339 _class_0 = setmetatable({
340 __init = function(self, ...)
341 return _class_0.__parent.__init(self, ...)
342 end,
343 __base = _base_0,
344 __name = "你好",
345 __parent = _parent_0
346 }, {
347 __index = function(cls, name)
348 local val = rawget(_base_0, name)
349 if val == nil then
350 local parent = rawget(cls, "__parent")
351 if parent then
352 return parent[name]
353 end
354 else
355 return val
356 end
357 end,
358 __call = function(cls, ...)
359 local _self_0 = setmetatable({ }, _base_0)
360 cls.__init(_self_0, ...)
361 return _self_0
362 end
363 })
364 _base_0.__class = _class_0
365 if _parent_0.__inherited then
366 _parent_0.__inherited(_parent_0, _class_0)
367 end
368 _u4f60_u597d = _class_0
369end
370do
371 local _with_0 = _u4f60_u597d()
372 _u5bf9_u8c61x = _with_0["一些对象"](_with_0)
373 _u6253_u5370(_u5bf9_u8c61x)
374 _u5bf9_u8c61x()
375end
376local _u8d85_u7ea7_u9177
377do
378 local _class_0
379 local _base_0 = {
380 ["👋"] = function(self)
381 _class_0.__parent.__base["👋"](self, 1, 2, 3, 4)(1, 2, 3, 4)
382 _class_0.__parent["一些东西"](1, 2, 3, 4)
383 local _ = _class_0.__parent["一些东西"](1, 2, 3, 4)["世界"]
384 local _call_0 = _class_0.__parent
385 _call_0["好吧"](_call_0, self, "世界")["不错"](_u54c8, _u54c8, _u54c8)
386 _ = _u4e00_u4e9b_u4e1c_u897f["上级"]
387 _ = _class_0.__parent["上级"]["上级"]["上级"]
388 do
389 local _base_1 = _class_0.__parent
390 local _fn_0 = _base_1["你好"]
391 _ = _fn_0 and function(...)
392 return _fn_0(_base_1, ...)
393 end
394 end
395 return nil
396 end
397 }
398 if _base_0.__index == nil then
399 _base_0.__index = _base_0
400 end
401 _class_0 = setmetatable({
402 __init = function() end,
403 __base = _base_0,
404 __name = "超级酷"
405 }, {
406 __index = _base_0,
407 __call = function(cls, ...)
408 local _self_0 = setmetatable({ }, _base_0)
409 cls.__init(_self_0, ...)
410 return _self_0
411 end
412 })
413 _base_0.__class = _class_0
414 _u8d85_u7ea7_u9177 = _class_0
415end
416local _u53d8_u91cfx = self["你好"]
417_u53d8_u91cfx = self.__class["你好"]
418self["你好"](self, "世界")
419self.__class["你好"](self.__class, "世界")
420self.__class["一"](self.__class, self.__class["二"](self.__class, 4, 5)(self["三"], self["四"]))
421local _u53d8_u91cfxx
422_u53d8_u91cfxx = function(_u4f60_u597d, _u4e16_u754c, _u9177)
423 self["你好"] = _u4f60_u597d
424 self.__class["世界"] = _u4e16_u754c
425end
426local _u4e00_u4e2a_u7c7b
427do
428 local _class_0
429 local _base_0 = {
430 ["蓝色"] = function(self) end,
431 ["绿色"] = function(self) end
432 }
433 if _base_0.__index == nil then
434 _base_0.__index = _base_0
435 end
436 _class_0 = setmetatable({
437 __init = function() end,
438 __base = _base_0,
439 __name = "一个类"
440 }, {
441 __index = _base_0,
442 __call = function(cls, ...)
443 local _self_0 = setmetatable({ }, _base_0)
444 cls.__init(_self_0, ...)
445 return _self_0
446 end
447 })
448 _base_0.__class = _class_0
449 local self = _class_0;
450 self["好"] = 343
451 self["你好"] = 3434
452 self["世界"] = 23423
453 self["红色"] = function(self) end
454 _u4e00_u4e2a_u7c7b = _class_0
455end
456_u53d8_u91cfx = self
457local _u53d8_u91cfy = self.__class
458self(_u4e00_u4e9b_u4e1c_u897f)
459self.__class(_u4e00_u4e9b_u4e1c_u897f)
460local self = self + self / self
461self = 343
462self["你好"](2, 3, 4)
463local _ = _u4f60_u597d[self]["世界"]
464local _u602a_u602a_u7684
465do
466 local _class_0
467 local _base_0 = { }
468 if _base_0.__index == nil then
469 _base_0.__index = _base_0
470 end
471 _class_0 = setmetatable({
472 __init = function() end,
473 __base = _base_0,
474 __name = "怪怪的"
475 }, {
476 __index = _base_0,
477 __call = function(cls, ...)
478 local _self_0 = setmetatable({ }, _base_0)
479 cls.__init(_self_0, ...)
480 return _self_0
481 end
482 })
483 _base_0.__class = _class_0
484 local self = _class_0;
485 _ = self["你好"]
486 if _u4e00_u4e9b_u4e1c_u897f then
487 _u6253_u5370("你好世界")
488 end
489 _u4f60_u597d = "世界"
490 self["另一"] = "天"
491 if _u4e00_u4e9b_u4e1c_u897f then
492 _u6253_u5370("好")
493 end
494 _u602a_u602a_u7684 = _class_0
495end
496_u6253_u5370("你好")
497local _u53d8_u91cfyyy
498_u53d8_u91cfyyy = function()
499 local _u9177
500 do
501 local _class_0
502 local _base_0 = { }
503 if _base_0.__index == nil then
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
524end
525do
526 local _class_0
527 local _base_0 = { }
528 if _base_0.__index == nil then
529 _base_0.__index = _base_0
530 end
531 _class_0 = setmetatable({
532 __init = function() end,
533 __base = _base_0,
534 __name = "子类D"
535 }, {
536 __index = _base_0,
537 __call = function(cls, ...)
538 local _self_0 = setmetatable({ }, _base_0)
539 cls.__init(_self_0, ...)
540 return _self_0
541 end
542 })
543 _base_0.__class = _class_0
544 local self = _class_0;
545 _ = nil
546 _u5bf9_u8c61a["字段b"]["字段c"]["子类D"] = _class_0
547end
548do
549 local _class_0
550 local _base_0 = { }
551 if _base_0.__index == nil then
552 _base_0.__index = _base_0
553 end
554 _class_0 = setmetatable({
555 __init = function() end,
556 __base = _base_0,
557 __name = "你好"
558 }, {
559 __index = _base_0,
560 __call = function(cls, ...)
561 local _self_0 = setmetatable({ }, _base_0)
562 cls.__init(_self_0, ...)
563 return _self_0
564 end
565 })
566 _base_0.__class = _class_0
567 local self = _class_0;
568 _ = nil
569 _u5bf9_u8c61a["字段b"]["你好"] = _class_0
570end
571do
572 local _class_0
573 local _parent_0 = _u4f60_u597d["世界"]
574 local _base_0 = { }
575 for _key_0, _val_0 in pairs(_parent_0.__base) do
576 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
577 _base_0[_key_0] = _val_0
578 end
579 end
580 if _base_0.__index == nil then
581 _base_0.__index = _base_0
582 end
583 setmetatable(_base_0, _parent_0.__base)
584 _class_0 = setmetatable({
585 __init = function(self, ...)
586 return _class_0.__parent.__init(self, ...)
587 end,
588 __base = _base_0,
589 __name = "某个成员",
590 __parent = _parent_0
591 }, {
592 __index = function(cls, name)
593 local val = rawget(_base_0, name)
594 if val == nil then
595 local parent = rawget(cls, "__parent")
596 if parent then
597 return parent[name]
598 end
599 else
600 return val
601 end
602 end,
603 __call = function(cls, ...)
604 local _self_0 = setmetatable({ }, _base_0)
605 cls.__init(_self_0, ...)
606 return _self_0
607 end
608 })
609 _base_0.__class = _class_0
610 local self = _class_0;
611 _ = nil
612 if _parent_0.__inherited then
613 _parent_0.__inherited(_parent_0, _class_0)
614 end
615 (function()
616 return require("moon")
617 end)()["某个成员"] = _class_0
618end
619local _u7c7ba
620do
621 local _class_0
622 local _base_0 = { }
623 if _base_0.__index == nil then
624 _base_0.__index = _base_0
625 end
626 _class_0 = setmetatable({
627 __init = function() end,
628 __base = _base_0,
629 __name = "类a"
630 }, {
631 __index = _base_0,
632 __call = function(cls, ...)
633 local _self_0 = setmetatable({ }, _base_0)
634 cls.__init(_self_0, ...)
635 return _self_0
636 end
637 })
638 _base_0.__class = _class_0
639 _u7c7ba = _class_0
640end
641local _u7c7bb
642do
643 local _class_0
644 local _base_0 = { }
645 if _base_0.__index == nil then
646 _base_0.__index = _base_0
647 end
648 _class_0 = setmetatable({
649 __init = function() end,
650 __base = _base_0,
651 __name = "一个类"
652 }, {
653 __index = _base_0,
654 __call = function(cls, ...)
655 local _self_0 = setmetatable({ }, _base_0)
656 cls.__init(_self_0, ...)
657 return _self_0
658 end
659 })
660 _base_0.__class = _class_0
661 _u4e00_u4e2a_u7c7b = _class_0
662 _u7c7bb = _class_0
663end
664local _u7c7bc
665do
666 local _class_0
667 local _parent_0 = _u4f60_u597d
668 local _base_0 = { }
669 for _key_0, _val_0 in pairs(_parent_0.__base) do
670 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
671 _base_0[_key_0] = _val_0
672 end
673 end
674 if _base_0.__index == nil then
675 _base_0.__index = _base_0
676 end
677 setmetatable(_base_0, _parent_0.__base)
678 _class_0 = setmetatable({
679 __init = function(self, ...)
680 return _class_0.__parent.__init(self, ...)
681 end,
682 __base = _base_0,
683 __name = "一个类",
684 __parent = _parent_0
685 }, {
686 __index = function(cls, name)
687 local val = rawget(_base_0, name)
688 if val == nil then
689 local parent = rawget(cls, "__parent")
690 if parent then
691 return parent[name]
692 end
693 else
694 return val
695 end
696 end,
697 __call = function(cls, ...)
698 local _self_0 = setmetatable({ }, _base_0)
699 cls.__init(_self_0, ...)
700 return _self_0
701 end
702 })
703 _base_0.__class = _class_0
704 if _parent_0.__inherited then
705 _parent_0.__inherited(_parent_0, _class_0)
706 end
707 _u4e00_u4e2a_u7c7b = _class_0
708 _u7c7bc = _class_0
709end
710local _u7c7bd
711do
712 local _class_0
713 local _parent_0 = _u4e16_u754c
714 local _base_0 = { }
715 for _key_0, _val_0 in pairs(_parent_0.__base) do
716 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
717 _base_0[_key_0] = _val_0
718 end
719 end
720 if _base_0.__index == nil then
721 _base_0.__index = _base_0
722 end
723 setmetatable(_base_0, _parent_0.__base)
724 _class_0 = setmetatable({
725 __init = function(self, ...)
726 return _class_0.__parent.__init(self, ...)
727 end,
728 __base = _base_0,
729 __name = "类d",
730 __parent = _parent_0
731 }, {
732 __index = function(cls, name)
733 local val = rawget(_base_0, name)
734 if val == nil then
735 local parent = rawget(cls, "__parent")
736 if parent then
737 return parent[name]
738 end
739 else
740 return val
741 end
742 end,
743 __call = function(cls, ...)
744 local _self_0 = setmetatable({ }, _base_0)
745 cls.__init(_self_0, ...)
746 return _self_0
747 end
748 })
749 _base_0.__class = _class_0
750 if _parent_0.__inherited then
751 _parent_0.__inherited(_parent_0, _class_0)
752 end
753 _u7c7bd = _class_0
754end
755_u6253_u5370(((function()
756 local _u5565_u4e8b
757 do
758 local _class_0
759 local _base_0 = { }
760 if _base_0.__index == nil then
761 _base_0.__index = _base_0
762 end
763 _class_0 = setmetatable({
764 __init = function() end,
765 __base = _base_0,
766 __name = "啥事"
767 }, {
768 __index = _base_0,
769 __call = function(cls, ...)
770 local _self_0 = setmetatable({ }, _base_0)
771 cls.__init(_self_0, ...)
772 return _self_0
773 end
774 })
775 _base_0.__class = _class_0
776 _u5565_u4e8b = _class_0
777 return _class_0
778 end
779end)()).__name)
780do
781 local _class_0
782 local _base_0 = { }
783 if _base_0.__index == nil then
784 _base_0.__index = _base_0
785 end
786 _class_0 = setmetatable({
787 __init = function() end,
788 __base = _base_0,
789 __name = "一个类"
790 }, {
791 __index = _base_0,
792 __call = function(cls, ...)
793 local _self_0 = setmetatable({ }, _base_0)
794 cls.__init(_self_0, ...)
795 return _self_0
796 end
797 })
798 _base_0.__class = _class_0
799 local self = _class_0;
800 _ = nil
801 _u4e00_u4e2a_u7c7b = _class_0
802end
803do
804 local _class_0
805 local _u503c, _u63d2_u5165
806 local _base_0 = { }
807 if _base_0.__index == nil then
808 _base_0.__index = _base_0
809 end
810 _class_0 = setmetatable({
811 __init = function(self)
812 return _u6253_u5370(_u63d2_u5165, _u503c)
813 end,
814 __base = _base_0,
815 __name = "一个类"
816 }, {
817 __index = _base_0,
818 __call = function(cls, ...)
819 local _self_0 = setmetatable({ }, _base_0)
820 cls.__init(_self_0, ...)
821 return _self_0
822 end
823 })
824 _base_0.__class = _class_0
825 local self = _class_0;
826 _u503c = 23
827 _u63d2_u5165 = _u8868["插入"]
828 _u4e00_u4e2a_u7c7b = _class_0
829end
830do
831 local _class_0
832 local _base_0 = { }
833 if _base_0.__index == nil then
834 _base_0.__index = _base_0
835 end
836 _class_0 = setmetatable({
837 __init = _u55e8,
838 __base = _base_0,
839 __name = "X类"
840 }, {
841 __index = _base_0,
842 __call = function(cls, ...)
843 local _self_0 = setmetatable({ }, _base_0)
844 cls.__init(_self_0, ...)
845 return _self_0
846 end
847 })
848 _base_0.__class = _class_0
849 X_u7c7b = _class_0
850end
851local _u9177
852do
853 local _class_0
854 local _parent_0 = _u4e1c_u897f
855 local _base_0 = {
856 ["当"] = function(self)
857 return {
858 ["你好"] = function()
859 return _class_0.__parent.__base["当"](self)
860 end,
861 ["世界"] = function()
862 return _class_0.__parent.one
863 end
864 }
865 end
866 }
867 for _key_0, _val_0 in pairs(_parent_0.__base) do
868 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
869 _base_0[_key_0] = _val_0
870 end
871 end
872 if _base_0.__index == nil then
873 _base_0.__index = _base_0
874 end
875 setmetatable(_base_0, _parent_0.__base)
876 _class_0 = setmetatable({
877 __init = function(self, ...)
878 return _class_0.__parent.__init(self, ...)
879 end,
880 __base = _base_0,
881 __name = "酷",
882 __parent = _parent_0
883 }, {
884 __index = function(cls, name)
885 local val = rawget(_base_0, name)
886 if val == nil then
887 local parent = rawget(cls, "__parent")
888 if parent then
889 return parent[name]
890 end
891 else
892 return val
893 end
894 end,
895 __call = function(cls, ...)
896 local _self_0 = setmetatable({ }, _base_0)
897 cls.__init(_self_0, ...)
898 return _self_0
899 end
900 })
901 _base_0.__class = _class_0
902 if _parent_0.__inherited then
903 _parent_0.__inherited(_parent_0, _class_0)
904 end
905 _u9177 = _class_0
906end
907local _u5947_u602a
908do
909 local _class_0
910 local _parent_0 = _u4e1c_u897f
911 local _base_0 = {
912 ["当"] = _u505a_u70b9_u4e8b(function(self)
913 return _class_0.__parent.__base["当"](self)
914 end)
915 }
916 for _key_0, _val_0 in pairs(_parent_0.__base) do
917 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
918 _base_0[_key_0] = _val_0
919 end
920 end
921 if _base_0.__index == nil then
922 _base_0.__index = _base_0
923 end
924 setmetatable(_base_0, _parent_0.__base)
925 _class_0 = setmetatable({
926 __init = function(self, ...)
927 return _class_0.__parent.__init(self, ...)
928 end,
929 __base = _base_0,
930 __name = "奇怪",
931 __parent = _parent_0
932 }, {
933 __index = function(cls, name)
934 local val = rawget(_base_0, name)
935 if val == nil then
936 local parent = rawget(cls, "__parent")
937 if parent then
938 return parent[name]
939 end
940 else
941 return val
942 end
943 end,
944 __call = function(cls, ...)
945 local _self_0 = setmetatable({ }, _base_0)
946 cls.__init(_self_0, ...)
947 return _self_0
948 end
949 })
950 _base_0.__class = _class_0
951 if _parent_0.__inherited then
952 _parent_0.__inherited(_parent_0, _class_0)
953 end
954 _u5947_u602a = _class_0
955end
956local _u5594_u54c8
957do
958 local _class_0
959 local _parent_0 = _u4e1c_u897f
960 local _base_0 = { }
961 for _key_0, _val_0 in pairs(_parent_0.__base) do
962 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
963 _base_0[_key_0] = _val_0
964 end
965 end
966 if _base_0.__index == nil then
967 _base_0.__index = _base_0
968 end
969 setmetatable(_base_0, _parent_0.__base)
970 _class_0 = setmetatable({
971 __init = function(self, ...)
972 return _class_0.__parent.__init(self, ...)
973 end,
974 __base = _base_0,
975 __name = "喔哈",
976 __parent = _parent_0
977 }, {
978 __index = function(cls, name)
979 local val = rawget(_base_0, name)
980 if val == nil then
981 local parent = rawget(cls, "__parent")
982 if parent then
983 return parent[name]
984 end
985 else
986 return val
987 end
988 end,
989 __call = function(cls, ...)
990 local _self_0 = setmetatable({ }, _base_0)
991 cls.__init(_self_0, ...)
992 return _self_0
993 end
994 })
995 _base_0.__class = _class_0
996 local self = _class_0;
997 self["底部"] = function()
998 _class_0.__parent["底部"](self)
999 _ = _class_0.__parent["你好"]
1000 local _call_0 = _class_0.__parent
1001 _call_0["你好"](_call_0, self)
1002 local _base_1 = _class_0.__parent
1003 local _fn_0 = _base_1["你好"]
1004 return _fn_0 and function(...)
1005 return _fn_0(_base_1, ...)
1006 end
1007 end
1008 self["空间"] = _u9177({
1009 function()
1010 _class_0.__parent["空间"](self)
1011 _ = _class_0.__parent["你好"]
1012 local _call_0 = _class_0.__parent
1013 _call_0["你好"](_call_0, self)
1014 local _base_1 = _class_0.__parent
1015 local _fn_0 = _base_1["你好"]
1016 return _fn_0 and function(...)
1017 return _fn_0(_base_1, ...)
1018 end
1019 end
1020 })
1021 if _parent_0.__inherited then
1022 _parent_0.__inherited(_parent_0, _class_0)
1023 end
1024 _u5594_u54c8 = _class_0
1025end
1026do
1027 local _u6d4b_u8bd5
1028 do
1029 local _class_0
1030 local _base_0 = {
1031 ["测试"] = function(self)
1032 return self.__class["如果"] and self.__class["做"](self.__class)
1033 end
1034 }
1035 if _base_0.__index == nil then
1036 _base_0.__index = _base_0
1037 end
1038 _class_0 = setmetatable({
1039 __init = function(self)
1040 self.__class["如果"] = true
1041 end,
1042 __base = _base_0,
1043 __name = "测试"
1044 }, {
1045 __index = _base_0,
1046 __call = function(cls, ...)
1047 local _self_0 = setmetatable({ }, _base_0)
1048 cls.__init(_self_0, ...)
1049 return _self_0
1050 end
1051 })
1052 _base_0.__class = _class_0
1053 local self = _class_0;
1054 self["做"] = function(self)
1055 return 1
1056 end
1057 _u6d4b_u8bd5 = _class_0
1058 end
1059 local _u6d4b_u8bd5_u5b9e_u4f8b = _u6d4b_u8bd5()
1060 _u6d4b_u8bd5_u5b9e_u4f8b["测试"](_u6d4b_u8bd5_u5b9e_u4f8b)
1061end
1062do
1063 local _u6d4b_u8bd5
1064 do
1065 local _class_0
1066 local _base_0 = {
1067 ["做"] = function(self)
1068 return 1
1069 end,
1070 ["测试"] = function(self)
1071 return self["如果"] and self["做"](self)
1072 end
1073 }
1074 if _base_0.__index == nil then
1075 _base_0.__index = _base_0
1076 end
1077 _class_0 = setmetatable({
1078 __init = function(self)
1079 self["如果"] = true
1080 end,
1081 __base = _base_0,
1082 __name = "测试"
1083 }, {
1084 __index = _base_0,
1085 __call = function(cls, ...)
1086 local _self_0 = setmetatable({ }, _base_0)
1087 cls.__init(_self_0, ...)
1088 return _self_0
1089 end
1090 })
1091 _base_0.__class = _class_0
1092 _u6d4b_u8bd5 = _class_0
1093 end
1094 local _u6d4b_u8bd5_u5b9e_u4f8b = _u6d4b_u8bd5()
1095 _u6d4b_u8bd5_u5b9e_u4f8b["测试"](_u6d4b_u8bd5_u5b9e_u4f8b)
1096end
1097do
1098 local _class_0
1099 local _parent_0 = _u9752["应用"]
1100 local _base_0 = {
1101 ["/"] = function(self)
1102 return {
1103 json = {
1104 ["状态"] = true
1105 }
1106 }
1107 end
1108 }
1109 for _key_0, _val_0 in pairs(_parent_0.__base) do
1110 if _base_0[_key_0] == nil and _key_0:match("^__") and not (_key_0 == "__index" and _val_0 == _parent_0.__base) then
1111 _base_0[_key_0] = _val_0
1112 end
1113 end
1114 if _base_0.__index == nil then
1115 _base_0.__index = _base_0
1116 end
1117 setmetatable(_base_0, _parent_0.__base)
1118 _class_0 = setmetatable({
1119 __init = function(self, ...)
1120 return _class_0.__parent.__init(self, ...)
1121 end,
1122 __base = _base_0,
1123 __parent = _parent_0
1124 }, {
1125 __index = function(cls, name)
1126 local val = rawget(_base_0, name)
1127 if val == nil then
1128 local parent = rawget(cls, "__parent")
1129 if parent then
1130 return parent[name]
1131 end
1132 else
1133 return val
1134 end
1135 end,
1136 __call = function(cls, ...)
1137 local _self_0 = setmetatable({ }, _base_0)
1138 cls.__init(_self_0, ...)
1139 return _self_0
1140 end
1141 })
1142 _base_0.__class = _class_0
1143 if _parent_0.__inherited then
1144 _parent_0.__inherited(_parent_0, _class_0)
1145 end
1146end
1147local _u7c7bA
1148do
1149 local _class_0
1150 local _base_0 = { }
1151 local _list_0 = {
1152 _u7c7bB,
1153 _u7c7bC,
1154 _u7c7bD,
1155 {
1156 ["值"] = 123
1157 }
1158 }
1159 for _index_0 = 1, #_list_0 do
1160 local _item_0 = _list_0[_index_0]
1161 local _cls_0, _mixin_0 = (_item_0.__base ~= nil), _item_0.__base or _item_0
1162 for _key_0, _val_0 in pairs(_mixin_0) do
1163 if _base_0[_key_0] == nil and (not _cls_0 or not _key_0:match("^__")) then
1164 _base_0[_key_0] = _val_0
1165 end
1166 end
1167 end
1168 if _base_0.__index == nil then
1169 _base_0.__index = _base_0
1170 end
1171 _class_0 = setmetatable({
1172 __init = function() end,
1173 __base = _base_0,
1174 __name = "类A"
1175 }, {
1176 __index = _base_0,
1177 __call = function(cls, ...)
1178 local _self_0 = setmetatable({ }, _base_0)
1179 cls.__init(_self_0, ...)
1180 return _self_0
1181 end
1182 })
1183 _base_0.__class = _class_0
1184 _u7c7bA = _class_0
1185end
1186local _u793a_u4f8b
1187do
1188 local _class_0
1189 local _base_0 = { }
1190 if _base_0.__index == nil then
1191 _base_0.__index = _base_0
1192 end
1193 _class_0 = setmetatable({
1194 __init = function() end,
1195 __base = _base_0,
1196 __name = "示例"
1197 }, {
1198 __index = _base_0,
1199 __call = function(cls, ...)
1200 local _self_0 = setmetatable({ }, _base_0)
1201 cls.__init(_self_0, ...)
1202 return _self_0
1203 end
1204 })
1205 _base_0.__class = _class_0
1206 local self = _class_0;
1207 self["字段1"] = 1
1208 self["字段2"] = self["字段1"] + 1
1209 _u793a_u4f8b = _class_0
1210end
1211local _u968f_u4fbf
1212do
1213 local _class_0
1214 local _base_0 = {
1215 __mul = function(self, _u53c2_u6570y)
1216 return self["x字段"] * _u53c2_u6570y
1217 end,
1218 ["任意名称"] = 123,
1219 ["相加"] = _u76f8_u52a0,
1220 __add = add
1221 }
1222 if _base_0.__index == nil then
1223 _base_0.__index = _base_0
1224 end
1225 _class_0 = setmetatable({
1226 __init = function(self, _u53c2_u6570)
1227 self["x字段"] = _u53c2_u6570
1228 end,
1229 __base = _base_0,
1230 __name = "随便"
1231 }, {
1232 __index = _base_0,
1233 __call = function(cls, ...)
1234 local _self_0 = setmetatable({ }, _base_0)
1235 cls.__init(_self_0, ...)
1236 return _self_0
1237 end
1238 })
1239 _base_0.__class = _class_0
1240 _u968f_u4fbf = _class_0
1241end
1242return nil
diff --git a/spec/outputs/unicode/comprehension.lua b/spec/outputs/unicode/comprehension.lua
new file mode 100644
index 0000000..60e490f
--- /dev/null
+++ b/spec/outputs/unicode/comprehension.lua
@@ -0,0 +1,276 @@
1local _u5217_u8868 = {
2 1,
3 2,
4 3,
5 4,
6 5,
7 6
8}
9local _u8f93_u51fa
10do
11 local _tbl_0 = { }
12 for _u5143_u7d20 in _u5bf9_u8c61_u6570_u7ec4 do
13 _tbl_0[_u5143_u7d20] = _u5143_u7d20 * 2
14 end
15 _u8f93_u51fa = _tbl_0
16end
17local _u5b57_u5178x = {
18 ["你好"] = "世界",
19 ["好吧"] = 2323
20}
21local _u590d_u5236
22do
23 local _tbl_0 = { }
24 for _u952e, _u503c in pairs(_u5bf9_u8c61x) do
25 if _u952e ~= "好吧" then
26 _tbl_0[_u952e] = _u503c
27 end
28 end
29 _u590d_u5236 = _tbl_0
30end
31local __u65e0_u6548_u53d8_u91cf
32do
33 local _tbl_0 = { }
34 for _u5143_u7d20 in _u662f_u7684 do
35 local _key_0, _val_0 = _u89e3_u5305(_u5143_u7d20)
36 _tbl_0[_key_0] = _val_0
37 end
38 __u65e0_u6548_u53d8_u91cf = _tbl_0
39end
40do
41 local _tbl_0 = { }
42 local _list_0 = _u662f_u7684
43 for _index_0 = 1, #_list_0 do
44 local _u5143_u7d20 = _list_0[_index_0]
45 local _key_0, _val_0 = _u89e3_u5305(_u5143_u7d20)
46 _tbl_0[_key_0] = _val_0
47 end
48 __u65e0_u6548_u53d8_u91cf = _tbl_0
49end
50do
51 local _tbl_0 = { }
52 for _u5143_u7d20 in _u662f_u7684 do
53 local _key_0, _val_0 = _u5143_u7d20_u5143_u7d20
54 _tbl_0[_key_0] = _val_0
55 end
56 __u65e0_u6548_u53d8_u91cf = _tbl_0
57end
58do
59 local _tbl_0 = { }
60 local _list_0 = {
61 {
62 1,
63 2
64 },
65 {
66 3,
67 4
68 }
69 }
70 for _index_0 = 1, #_list_0 do
71 local x_u5bf9_u8c61 = _list_0[_index_0]
72 local _key_0, _val_0 = _u89e3_u5305((function()
73 local _accum_0 = { }
74 local _len_0 = 1
75 for _u8ba1_u6570, _u5bf9_u8c61 in ipairs(x_u5bf9_u8c61) do
76 _accum_0[_len_0] = _u5bf9_u8c61 * _u8ba1_u6570
77 _len_0 = _len_0 + 1
78 end
79 return _accum_0
80 end)())
81 _tbl_0[_key_0] = _val_0
82 end
83 __u65e0_u6548_u53d8_u91cf = _tbl_0
84end
85local _u53d8_u91cf1
86do
87 local _accum_0 = { }
88 local _len_0 = 1
89 for _u8ba1_u6570 = 1, 10 do
90 _accum_0[_len_0] = _u8ba1_u6570
91 _len_0 = _len_0 + 1
92 end
93 _u53d8_u91cf1 = _accum_0
94end
95local _u53d8_u91cf2
96do
97 local _accum_0 = { }
98 local _len_0 = 1
99 for _u8ba1_u6570 = 1, 10 do
100 if _u8ba1_u6570 % 2 == 1 then
101 _accum_0[_len_0] = _u8ba1_u6570
102 _len_0 = _len_0 + 1
103 end
104 end
105 _u53d8_u91cf2 = _accum_0
106end
107local _u53d8_u91cfaa
108do
109 local _accum_0 = { }
110 local _len_0 = 1
111 for _u8ba1_u6570x = 1, 10 do
112 for _u8ba1_u6570y = 5, 14 do
113 _accum_0[_len_0] = {
114 _u8ba1_u6570x,
115 _u8ba1_u6570y
116 }
117 _len_0 = _len_0 + 1
118 end
119 end
120 _u53d8_u91cfaa = _accum_0
121end
122local _u53d8_u91cfbb
123do
124 local _accum_0 = { }
125 local _len_0 = 1
126 for _u5143_u7d20 in _u5bf9_u8c61y do
127 for _u8ba1_u6570i = 1, 10 do
128 _accum_0[_len_0] = _u5bf9_u8c61y
129 _len_0 = _len_0 + 1
130 end
131 end
132 _u53d8_u91cfbb = _accum_0
133end
134local _u53d8_u91cfcc
135do
136 local _accum_0 = { }
137 local _len_0 = 1
138 for _u8ba1_u6570 = 1, 10 do
139 for _u5143_u7d20 in _u5bf9_u8c61y do
140 _accum_0[_len_0] = _u5bf9_u8c61y
141 _len_0 = _len_0 + 1
142 end
143 end
144 _u53d8_u91cfcc = _accum_0
145end
146local _u53d8_u91cfdd
147do
148 local _accum_0 = { }
149 local _len_0 = 1
150 for _u8ba1_u6570 = 1, 10 do
151 if _u9177 then
152 for _u5143_u7d20 in _u5bf9_u8c61y do
153 if _u53d8_u91cfx > 3 then
154 if _u53d8_u91cfc + 3 then
155 _accum_0[_len_0] = _u5bf9_u8c61y
156 _len_0 = _len_0 + 1
157 end
158 end
159 end
160 end
161 end
162 _u53d8_u91cfdd = _accum_0
163end
164do
165 local _tbl_0 = { }
166 for _u8ba1_u6570 = 1, 10 do
167 _tbl_0["你好"] = "世界"
168 end
169 __u65e0_u6548_u53d8_u91cf = _tbl_0
170end
171local _u53d8_u91cfj
172do
173 local _accum_0 = { }
174 local _len_0 = 1
175 for _des_0 in _u5f88_u591a_u4e1c_u897f do
176 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _des_0[1], _des_0[2], _des_0[3]
177 _accum_0[_len_0] = _u5143_u7d20a
178 _len_0 = _len_0 + 1
179 end
180 _u53d8_u91cfj = _accum_0
181end
182local _u53d8_u91cfk
183do
184 local _accum_0 = { }
185 local _len_0 = 1
186 local _list_0 = _u5f88_u591a_u4e1c_u897f
187 for _index_0 = 1, #_list_0 do
188 local _des_0 = _list_0[_index_0]
189 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _des_0[1], _des_0[2], _des_0[3]
190 _accum_0[_len_0] = _u5143_u7d20a
191 _len_0 = _len_0 + 1
192 end
193 _u53d8_u91cfk = _accum_0
194end
195local _u53d8_u91cfi
196do
197 local _accum_0 = { }
198 local _len_0 = 1
199 local _list_0 = _u5f88_u591a_u4e1c_u897f
200 for _index_0 = 1, #_list_0 do
201 local _des_0 = _list_0[_index_0]
202 local _u4f60_u597d, _u4e16_u754c = _des_0["你好"], _des_0["世界"]
203 _accum_0[_len_0] = _u4f60_u597d
204 _len_0 = _len_0 + 1
205 end
206 _u53d8_u91cfi = _accum_0
207end
208local _u53d8_u91cfhj
209do
210 local _tbl_0 = { }
211 for _des_0 in _u5f88_u591a_u4e1c_u897f do
212 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _des_0[1], _des_0[2], _des_0[3]
213 _tbl_0[_u5143_u7d20a] = _u5143_u7d20c
214 end
215 _u53d8_u91cfhj = _tbl_0
216end
217local _u53d8_u91cfhk
218do
219 local _tbl_0 = { }
220 local _list_0 = _u5f88_u591a_u4e1c_u897f
221 for _index_0 = 1, #_list_0 do
222 local _des_0 = _list_0[_index_0]
223 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _des_0[1], _des_0[2], _des_0[3]
224 _tbl_0[_u5143_u7d20a] = _u5143_u7d20c
225 end
226 _u53d8_u91cfhk = _tbl_0
227end
228local _u53d8_u91cfhi
229do
230 local _tbl_0 = { }
231 local _list_0 = _u5f88_u591a_u4e1c_u897f
232 for _index_0 = 1, #_list_0 do
233 local _des_0 = _list_0[_index_0]
234 local _u4f60_u597d, _u4e16_u754c = _des_0["你好"], _des_0["世界"]
235 _tbl_0[_u4f60_u597d] = _u4e16_u754c
236 end
237 _u53d8_u91cfhi = _tbl_0
238end
239for _des_0 in _u5f88_u591a_u4e1c_u897f do
240 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _des_0[1], _des_0[2], _des_0[3]
241 _u6ca1_u9519(_u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c)
242end
243do
244 local _accum_0 = { }
245 local _len_0 = 1
246 local _max_0 = 3 + 4
247 for _index_0 = 1 + 2, _max_0 < 0 and #_u5217_u8868 + _max_0 or _max_0 do
248 local _u9879_u76ee = _u5217_u8868[_index_0]
249 _accum_0[_len_0] = _u9879_u76ee
250 _len_0 = _len_0 + 1
251 end
252 __u65e0_u6548_u53d8_u91cf = _accum_0
253end
254do
255 local _accum_0 = { }
256 local _len_0 = 1
257 local _max_0 = 2 - _u4e1c_u897f[4]
258 for _index_0 = _u4f60_u597d() * 4, _max_0 < 0 and #_u5217_u8868 + _max_0 or _max_0 do
259 local _u9879_u76ee = _u5217_u8868[_index_0]
260 _accum_0[_len_0] = _u9879_u76ee
261 _len_0 = _len_0 + 1
262 end
263 __u65e0_u6548_u53d8_u91cf = _accum_0
264end
265do
266 local _accum_0 = { }
267 local _len_0 = 1
268 for _u9879_u76ee in _u5217_u8868 do
269 if _u9879_u76ee ~= nil then
270 _accum_0[_len_0] = _u9879_u76ee["调用"](_u9879_u76ee, 123)
271 end
272 _len_0 = _len_0 + 1
273 end
274 _u5217_u8868 = _accum_0
275end
276return nil
diff --git a/spec/outputs/unicode/cond.lua b/spec/outputs/unicode/cond.lua
new file mode 100644
index 0000000..f972dea
--- /dev/null
+++ b/spec/outputs/unicode/cond.lua
@@ -0,0 +1,354 @@
1local _u4f60_u5f88_u9177 = false
2local __u65e0_u6548_u53d8_u91cf
3if _u9177 then
4 if _u4f60_u5f88_u9177 then
5 __u65e0_u6548_u53d8_u91cf = _u4e00
6 else
7 if _u5403_u4e1c_u897f then
8 __u65e0_u6548_u53d8_u91cf = _u597d
9 else
10 __u65e0_u6548_u53d8_u91cf = _u4e8c
11 __u65e0_u6548_u53d8_u91cf = _u4e09
12 end
13 end
14else
15 __u65e0_u6548_u53d8_u91cf = _u5426
16end
17if _u9177 then
18 __u65e0_u6548_u53d8_u91cf = _u5426
19end
20if _u9177 then
21 __u65e0_u6548_u53d8_u91cf = _u5426
22else
23 __u65e0_u6548_u53d8_u91cf = _u662f
24end
25if _u9177 then
26 _u5594(_u9177)
27else
28 _u6ca1_u90a3_u4e48(_u9177)
29end
30if _u5728_u5de5_u4f5c then
31 if _u9177 then
32 if _u9177 then
33 __u65e0_u6548_u53d8_u91cf = _u597d_u5427
34 else
35 __u65e0_u6548_u53d8_u91cf = _u4ec0_u4e48
36 end
37 else
38 __u65e0_u6548_u53d8_u91cf = _u5450
39 end
40end
41if _u270c_ufe0f then
42 _u65e0(_u65e5)
43elseif _u9177(_u6211) then
44 _u597d_u5427(_u5440)
45else
46 u_u578b(_u8def)
47end
48if _u270c_ufe0f then
49 _u65e0(_u7236)
50else
51 if _u9177(_u4f60) then
52 _u597d_u5427(_u5427)
53 else
54 p_u578b(_u8def)
55 end
56end
57if (function() end)() then
58 _u968f_u4fbf(_u600e_u6837)
59end
60if nil then
61 _u7ffb_u8f6c(_u6211)
62else
63 _u8fd9_u4e2a(_u662f, _u5f27_u5ea6)
64end
65if _u4e1c_u897f(_u4e0d_u9519) then
66 _u6ca1(_u6cd5)
67elseif _u597d_u7684(_u786e_u5b9a) then
68 _u4ec0_u4e48(_u8fd9_u91cc)
69end
70if _u5f88_u591a_u4e1c_u897f then
71 _u6ca1(_u673a_u4f1a)
72elseif _u597d_u5427 then
73 _u73b0_u5728(_u600e_u4e48_u529e)
74end
75if _u5f88_u591a_u4e1c_u897f then
76 _u662f(_u4f19_u8ba1)
77elseif _u597d_u7684(_u4eba) then
78 _u55e8(_u597d_u5440)
79else
80 _u55ef(_u786e_u5b9a)
81end
82if _u6211_u4eec(_u8d70_u5427) then
83 _u6253_u5370("打招呼")
84elseif "只有我们" then
85 _u6253_u5370("威尔史密斯")
86else
87 _u663e_u793a(5555555)
88end
89do
90 local _u67d0_u4e1c_u897f = 10
91 if _u67d0_u4e1c_u897f then
92 _u6253_u5370(_u67d0_u4e1c_u897f)
93 else
94 _u6253_u5370("其它")
95 end
96end
97local _u4f60_u597d
98do
99 local _u67d0_u4e1c_u897f = 10
100 if _u67d0_u4e1c_u897f then
101 _u4f60_u597d = _u6253_u5370(_u67d0_u4e1c_u897f)
102 else
103 _u4f60_u597d = _u6253_u5370("其它")
104 end
105end
106_u4f60_u597d = 5 + (function()
107 local _u67d0_u4e1c_u897f = 10
108 if _u67d0_u4e1c_u897f then
109 return _u6253_u5370(_u67d0_u4e1c_u897f)
110 end
111end)()
112local z_u53d8_u91cf = false
113if false then
114 __u65e0_u6548_u53d8_u91cf = _u4e00
115else
116 do
117 local _u6761_u4ef6x = true
118 if _u6761_u4ef6x then
119 __u65e0_u6548_u53d8_u91cf = _u4e8c
120 else
121 do
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
130 end
131end
132local _u8f93_u51fa
133if false then
134 _u8f93_u51fa = _u4e00
135else
136 do
137 local _u6761_u4ef6x = true
138 if _u6761_u4ef6x then
139 _u8f93_u51fa = _u4e8c
140 else
141 do
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
150 end
151end
152local _u53d8_u91cf
153_u53d8_u91cf = function()
154 do
155 local _u67d0_u4e1c_u897f = true
156 if _u67d0_u4e1c_u897f then
157 return 1
158 else
159 do
160 local _u53e6_u4e00_u4e2a = false
161 if _u53e6_u4e00_u4e2a then
162 return 2
163 end
164 end
165 end
166 end
167end
168if not true then
169 _u6253_u5370("酷!")
170end
171if not (true and false) then
172 _u6253_u5370("酷!")
173end
174if not false then
175 _u6253_u5370("酷!")
176end
177if not false then
178 _u6253_u5370("酷!")
179else
180 _u6253_u5370("no way!")
181end
182if not nil then
183 _u6253_u5370("hello")
184else
185 _u6253_u5370("world")
186end
187local x
188if not true then
189 x = _u6253_u5370("酷!")
190end
191if not (true and false) then
192 x = _u6253_u5370("酷!")
193end
194local y
195if not false then
196 y = _u6253_u5370("酷!")
197end
198if not false then
199 y = _u6253_u5370("酷!")
200else
201 y = _u6253_u5370("没门!")
202end
203local z
204if not nil then
205 z = _u6253_u5370("你好")
206else
207 z = _u6253_u5370("世界")
208end
209_u6253_u5370((function()
210 if not true then
211 return _u6253_u5370("酷!")
212 end
213end)())
214_u6253_u5370((function()
215 if not (true and false) then
216 return _u6253_u5370("酷!")
217 end
218end)())
219_u6253_u5370((function()
220 if not false then
221 return _u6253_u5370("酷!")
222 end
223end)())
224_u6253_u5370((function()
225 if not false then
226 return _u6253_u5370("酷!")
227 else
228 return _u6253_u5370("没门!")
229 end
230end)())
231_u6253_u5370((function()
232 if not nil then
233 return _u6253_u5370("你好")
234 else
235 return _u6253_u5370("世界")
236 end
237end)())
238if not _u503c then
239 _u6253_u5370("你好")
240end
241local _u53d8_u91cfdddd
242if not _u503c then
243 _u53d8_u91cfdddd = {
244 1,
245 2,
246 3
247 }
248end
249do
250 local j_u53d8_u91cf = 100
251 j_u53d8_u91cf = _u55e8()
252 if not j_u53d8_u91cf then
253 _u9519_u8bef("不是 j变量!")
254 end
255end
256local _u53d8_u91cfa = 12
257local _u53d8_u91cfc, _u53d8_u91cfb
258if _u67d0_u4e1c_u897f then
259 _u53d8_u91cfa, _u53d8_u91cfc, _u53d8_u91cfb = "酷", nil, nil
260end
261local _u53d8_u91cfj
262if 1 then
263 if 2 then
264 _u53d8_u91cfj = 3
265 end
266else
267 _u53d8_u91cfj = 6
268end
269local _u53d8_u91cfm
270if 1 then
271 if 2 then
272 _u53d8_u91cfm = 3
273 end
274else
275 _u53d8_u91cfm = 6
276end
277do
278 _u51fd_u6570a({
279 ["字段b"] = _u5b57_u6bb5b
280 })
281 if _u51fd_u6570a then
282 return {
283 ["字段b"] = _u5b57_u6bb5b
284 }
285 else
286 if _u51fd_u6570c then
287 return {
288 ["字段d"] = _u53d8_u91cfe
289 }
290 else
291 return {
292 ["字段f"] = 123
293 }
294 end
295 end
296end
297do
298 _u51fd_u6570c({
299 ["字段d"] = _u53d8_u91cfe
300 })
301 if _u6761_u4ef6a then
302 local _u5b57_u6bb5b = _u53d8_u91cftb["字段b"]
303 elseif _u6761_u4ef6c then
304 local _u53d8_u91cfe = _u53d8_u91cftb["字段d"]
305 end
306end
307do
308 local _des_0 = _u6570_u5b66_u5e93
309 if _des_0 then
310 local _u6d3e = _des_0["派"]
311 _u6253_u5370(_u6d3e)
312 end
313end
314do
315 local _u6570_u5b66_u5e93
316 if _u6570_u5b66_u5e93 then
317 local _u6d3e = _u6570_u5b66_u5e93["派"]
318 _u6253_u5370(_u6d3e)
319 end
320end
321do
322 do
323 local __u6a21_u5757 = { }
324 if __u6a21_u5757 then
325 local _u4e1c_u897f = __u6a21_u5757["东西"]
326 local a_u529f_u80fd, b_u529f_u80fd = __u6a21_u5757["a功能"], __u6a21_u5757["b功能"]
327 end
328 end
329end
330do
331 do
332 local _des_0 = { }
333 if _des_0 then
334 __u6a21_u5757 = _des_0
335 local _u4e1c_u897f = __u6a21_u5757["东西"]
336 local a_u529f_u80fd, b_u529f_u80fd
337 do
338 local _obj_0 = __u6a21_u5757
339 a_u529f_u80fd, b_u529f_u80fd = _obj_0["a功能"], _obj_0["b功能"]
340 end
341 end
342 end
343end
344do
345 local _u53d8_u91cfv
346 if 1 and (function()
347 return 0 ~= 1
348 end)() then
349 _u53d8_u91cfv = 1
350 else
351 _u53d8_u91cfv = 2
352 end
353end
354return nil
diff --git a/spec/outputs/unicode/destructure.lua b/spec/outputs/unicode/destructure.lua
new file mode 100644
index 0000000..002c4b0
--- /dev/null
+++ b/spec/outputs/unicode/destructure.lua
@@ -0,0 +1,637 @@
1do
2 local _u5143_u7d20a, _u5143_u7d20b
3 do
4 local _obj_0 = _u4f60_u597d
5 _u5143_u7d20a, _u5143_u7d20b = _obj_0[1], _obj_0[2]
6 end
7 local _u5143_u7d20c
8 do
9 local _obj_0 = _u4f60_u597d
10 _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _obj_0[1][1], _obj_0[2], _obj_0[3][1]
11 end
12 local _u4f60_u597d, _u4e16_u754c
13 do
14 local _obj_0 = _u503c
15 _u4f60_u597d, _u4e16_u754c = _obj_0["你好"], _obj_0["世界"]
16 end
17end
18do
19 local _u5426, _u4e1c_u897f
20 do
21 local _obj_0 = _u4e16_u754c
22 _u5426, _u4e1c_u897f = _obj_0["是"], _obj_0[1]
23 end
24 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c, d_u5b57_u6bb5
25 do
26 local _obj_0 = _u597d
27 _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c, d_u5b57_u6bb5 = _obj_0["字段a"], _obj_0["字段b"], _obj_0["字段c"], _obj_0["d字段"]
28 end
29 local _u53d8_u91cfb = _u4e8c
30 local a_u5143_u7d20 = _u4e00[1]
31 local _u53d8_u91cfc = nil
32 local b_u5143_u7d20 = _u4e00[1]
33 local _u53d8_u91cfe = _u4e8c
34 local d_u5143_u7d20 = _u4e00[1]
35 local _u53d8_u91cfx = _u4e00
36 local _u5143_u7d20y = _u4e8c[1]
37 local _u53d8_u91cfxx, _u53d8_u91cfyy = 1, 2
38 local _u5143_u7d20yy, _u5143_u7d20xx
39 do
40 local _obj_0 = {
41 _u53d8_u91cfxx,
42 _u53d8_u91cfyy
43 }
44 _u5143_u7d20yy, _u5143_u7d20xx = _obj_0[1], _obj_0[2]
45 end
46 local _u5143_u7d20a, _u5143_u7d20c, _u5b57_u6bb5d, _u5143_u7d20e, _u5b57_u6bb5f, _u5143_u7d20g
47 do
48 local _obj_0 = _u8868
49 _u5143_u7d20a, _u5b57_u6bb5b, _u5143_u7d20c, _u5b57_u6bb5d, _u5143_u7d20e, _u5b57_u6bb5f, _u5143_u7d20g = _obj_0[1], _obj_0["字段b"], _obj_0[2], _obj_0["字段d"], _obj_0[3], _obj_0["字段f"], _obj_0[4]
50 end
51 do
52 _u53d8_u91cfc = nil
53 do
54 local _obj_0 = _u8868
55 _u5b57_u6bb5a, _u5b57_u6bb5b = _obj_0["字段a"], _obj_0["字段b"]
56 end
57 end
58 do
59 local _u53d8_u91cfa = _u8868
60 do
61 local _obj_0 = __u65e0_u6548_u53d8_u91cf
62 _u5b57_u6bb5b, _u5b57_u6bb5c = _obj_0["字段b"], _obj_0["字段c"]
63 end
64 end
65 do
66 _u53d8_u91cfb = __u65e0_u6548_u53d8_u91cf
67 _u5b57_u6bb5a = _u8868["字段a"]
68 _u5b57_u6bb5c = __u65e0_u6548_u53d8_u91cf["字段c"]
69 end
70end
71do
72 local _u672a_u6765_u4eba_u4eec = {
73 ["雕刻家"] = "翁贝托·博乔尼",
74 ["画家"] = "弗拉基米尔·伯留克",
75 ["诗人"] = {
76 ["姓名"] = "F.T.马里内蒂",
77 ["地址"] = {
78 "罗马42R大街",
79 "贝拉焦,意大利 22021"
80 }
81 }
82 }
83 do
84 local _u59d3_u540d, _u8857_u9053, _u57ce_u5e02 = _u672a_u6765_u4eba_u4eec["诗人"]["姓名"], _u672a_u6765_u4eba_u4eec["诗人"]["地址"][1], _u672a_u6765_u4eba_u4eec["诗人"]["地址"][2]
85 end
86 do
87 local _u96d5_u523b_u5bb6, _u753b_u5bb6, _u59d3_u540d, _u8857_u9053, _u57ce_u5e02 = _u672a_u6765_u4eba_u4eec["雕刻家"], _u672a_u6765_u4eba_u4eec["画家"], _u672a_u6765_u4eba_u4eec["诗人"]["姓名"], _u672a_u6765_u4eba_u4eec["诗人"]["地址"][1], _u672a_u6765_u4eba_u4eec["诗人"]["地址"][2]
88 end
89end
90do
91 local _u53d8_u91cfc, _u53d8_u91cfe
92 do
93 local _obj_0 = _u5bf9_u8c61tb
94 _u53d8_u91cfc, _u53d8_u91cfe = _obj_0["字段a"]["字段b"], _obj_0["字段a"]["字段d"]
95 end
96end
97do
98 local _u53d8_u91cfc, _u53d8_u91cfe, _u5143_u7d20f
99 do
100 local _obj_0 = _u5bf9_u8c61tb
101 _u53d8_u91cfc, _u53d8_u91cfe, _u5143_u7d20f = _obj_0["字段a"][1]["字段b"], _obj_0["字段a"][2]["字段d"], _obj_0["字段a"][3]
102 end
103end
104do
105 self["世界"] = _u53d8_u91cfx[1]
106 do
107 local _obj_0 = _u53d8_u91cfx
108 _u5bf9_u8c61a["字段b"], _u5bf9_u8c61c["字段y"], _u51fd_u6570()["字段z"] = _obj_0[1], _obj_0[2], _obj_0[3]
109 end
110 self["世界"] = _u53d8_u91cfx["世界"]
111end
112do
113 local _u4e1c_u897f = {
114 {
115 1,
116 2
117 },
118 {
119 3,
120 4
121 }
122 }
123 for _index_0 = 1, #_u4e1c_u897f do
124 local _des_0 = _u4e1c_u897f[_index_0]
125 local _u5143_u7d20x, _u5143_u7d20y = _des_0[1], _des_0[2]
126 _u6253_u5370(_u5143_u7d20x, _u5143_u7d20y)
127 end
128end
129do
130 do
131 local _with_0 = _u4e1c_u897f
132 local _u5143_u7d20a, _u5143_u7d20b = _with_0[1], _with_0[2]
133 _u6253_u5370(_u5143_u7d20a, _u5143_u7d20b)
134 end
135end
136do
137 local _u4e1c_u897f = nil
138 if _u4e1c_u897f then
139 local _u5143_u7d20a = _u4e1c_u897f[1]
140 _u6253_u5370(_u5143_u7d20a)
141 else
142 _u6253_u5370("没东西")
143 end
144 local _u4e1c_u4e1c = {
145 1,
146 2
147 }
148 if _u4e1c_u4e1c then
149 local _u5143_u7d20a, _u5143_u7d20b = _u4e1c_u4e1c[1], _u4e1c_u4e1c[2]
150 _u6253_u5370(_u5143_u7d20a, _u5143_u7d20b)
151 end
152 if _u4e1c_u897f then
153 local _u5143_u7d20a, _u5143_u7d20b = _u4e1c_u897f[1], _u4e1c_u897f[2]
154 _u6253_u5370(_u5143_u7d20a, _u5143_u7d20b)
155 else
156 if _u4e1c_u4e1c then
157 local _u5143_u7d20c, _u5143_u7d20d = _u4e1c_u4e1c[1], _u4e1c_u4e1c[2]
158 _u6253_u5370(_u5143_u7d20c, _u5143_u7d20d)
159 else
160 _u6253_u5370("不")
161 end
162 end
163end
164do
165 local _u53d8_u91cfz = "好"
166 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _u53d8_u91cfz[1], _u53d8_u91cfz[2], _u53d8_u91cfz[3]
167end
168do
169 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c
170 do
171 local _obj_0 = _u53d8_u91cfz
172 _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _obj_0[1], _obj_0[2], _obj_0[3]
173 end
174end
175local _
176_ = function(_u53c2_u6570z)
177 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _u53c2_u6570z[1], _u53c2_u6570z[2], _u53c2_u6570z[3]
178end
179do
180 local _u53d8_u91cfz = "〇〇"
181 _ = function(_u53c2_u6570k)
182 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c
183 do
184 local _obj_0 = _u53c2_u6570z
185 _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _obj_0[1], _obj_0[2], _obj_0[3]
186 end
187 end
188end
189do
190 local _u7ed3_u675f_u53d8_u91cf = _u4e1c_u897f["函数"]["结束"]
191end
192do
193 local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c
194 do
195 local _obj_0 = _u4e1c_u897f
196 _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _obj_0["如果"][1], _obj_0["如果"][2], _obj_0["如果"][3]
197 end
198end
199do
200 local _u5b57_u6bb5a, _u5b57_u6bb5b
201 if true then
202 do
203 local _obj_0 = {
204 ["字段a"] = "你好",
205 ["字段b"] = "世界"
206 }
207 _u5b57_u6bb5a, _u5b57_u6bb5b = _obj_0["字段a"], _obj_0["字段b"]
208 end
209 end
210 local _u5929, _u5c0f_u65f6, _u5206_u949f, _u79d2
211 do
212 local _accum_0 = { }
213 local _len_0 = 1
214 local _list_0 = {
215 string.match("1 2 3 4", "(.+)%s(.+)%s(.+)%s(.+)")
216 }
217 for _index_0 = 1, #_list_0 do
218 local _u5143_u7d20 = _list_0[_index_0]
219 _accum_0[_len_0] = tonumber(_u5143_u7d20)
220 _len_0 = _len_0 + 1
221 end
222 _u5929, _u5c0f_u65f6, _u5206_u949f, _u79d2 = _accum_0[1], _accum_0[2], _accum_0[3], _accum_0[4]
223 end
224 local _u4e00, _u4e8c, _u4e09
225 do
226 local _tbl_0 = { }
227 for _u5339_u914d_u7ed3_u679c in (function()
228 local _call_0 = _u968f_u673a_u5bf9_u8c61
229 return _call_0["全局匹配"](_call_0, "%S+")
230 end)() do
231 _tbl_0[_u5339_u914d_u7ed3_u679c] = true
232 end
233 _u4e00, _u4e8c, _u4e09 = _tbl_0["一"], _tbl_0["二"], _tbl_0["三"]
234 end
235 local _u53d8_u91cfb = 123
236 _u5b57_u6bb5a = ((function()
237 local _call_0 = _u5bf9_u8c61a
238 return _call_0["如果"](_call_0, 123)
239 end)() + _u53d8_u91cft)["字段a"]
240end
241do
242 local _u540d_u79f0, _u5de5_u4f5c
243 do
244 local _obj_0 = _u4e2a_u4eba
245 _u540d_u79f0, _u5de5_u4f5c = _obj_0["名称"], _obj_0["工作"]
246 if _u540d_u79f0 == nil then
247 _u540d_u79f0 = "没名字"
248 end
249 if _u5de5_u4f5c == nil then
250 _u5de5_u4f5c = "没工作"
251 end
252 end
253 local _u8bf7_u6c42
254 _u8bf7_u6c42 = function(_u5730_u5740, _u9009_u9879)
255 if _u9009_u9879 == nil then
256 _u9009_u9879 = { }
257 end
258 local _u65b9_u5f0f, _u8bf7_u6c42_u5934, _u53c2_u6570, _u8d1f_u8f7d, _u786e_u8ba4, _u9519_u8bef, _u6700_u7ec8_u5904_u7406 = _u9009_u9879["方式"], _u9009_u9879["请求头"], _u9009_u9879["参数"], _u9009_u9879["负载"], _u9009_u9879["确认"], _u9009_u9879["错误"], _u9009_u9879["最终处理"]
259 if _u65b9_u5f0f == nil then
260 _u65b9_u5f0f = "GET"
261 end
262 if _u8bf7_u6c42_u5934 == nil then
263 _u8bf7_u6c42_u5934 = { }
264 end
265 if _u53c2_u6570 == nil then
266 _u53c2_u6570 = { }
267 end
268 if _u8d1f_u8f7d == nil then
269 _u8d1f_u8f7d = ""
270 end
271 local _u7ed3_u679c = _u53d1_u8d77_u8bf7_u6c42(_u5730_u5740, _u65b9_u5f0f, _u53c2_u6570, _u8d1f_u8f7d, _u786e_u8ba4, _u9519_u8bef, _u6700_u7ec8_u5904_u7406)
272 return _u7ed3_u679c
273 end
274 local _u503c1, _u952e3
275 do
276 local _obj_0 = _u5bf9_u8c61tb
277 _u503c1, _u952e3 = _obj_0["键1"]["键2"], _obj_0["键3"]
278 if _u503c1 == nil then
279 _u503c1 = 123
280 end
281 if _u952e3 == nil then
282 _u952e3 = "abc"
283 end
284 end
285 local _u5143_u8868, call, add
286 do
287 local _obj_0 = getmetatable(_u5bf9_u8c61tb)
288 _u5143_u8868, call, add = _obj_0, getmetatable(_obj_0).__call, getmetatable(_obj_0).__add
289 if _u5143_u8868 == nil then
290 _u5143_u8868 = {
291 __index = {
292 ["字段abc"] = 123
293 }
294 }
295 end
296 if call == nil then
297 call = (function()
298 return { }
299 end)
300 end
301 end
302 local _u5143_u8868x, y_u5b57_u6bb5, z_u53d8_u91cf, index
303 do
304 local _obj_0 = _u5bf9_u8c61tb
305 _u5143_u8868x, y_u5b57_u6bb5, z_u53d8_u91cf = getmetatable(_obj_0["字段x"]), _obj_0["y字段"], _obj_0["z字段"]
306 if _u5143_u8868x == nil then
307 _u5143_u8868x = { }
308 end
309 index = getmetatable(_obj_0).__index
310 if index == nil then
311 index = function()
312 return nil
313 end
314 end
315 end
316 do
317 local _tmp_0
318 do
319 local _obj_0 = getmetatable(_u5bf9_u8c61tb)
320 _tmp_0 = _obj_0["函数"]
321 end
322 if _tmp_0 == nil then
323 do
324 local _obj_0 = _u9879_u76ee
325 if _obj_0 ~= nil then
326 _tmp_0 = _obj_0["默认值"]
327 end
328 end
329 end
330 a_u5bf9_u8c61["b字段"](function()
331 return 123
332 end)["字段c"] = _tmp_0
333 end
334end
335do
336 local _u5143_u8868, _u51cf_u51fd_u6570
337 do
338 local _obj_0 = getmetatable(_u5bf9_u8c61tb["字段x"])
339 _u5143_u8868, _u51cf_u51fd_u6570 = _obj_0, _obj_0.__sub
340 if _u5143_u8868 == nil then
341 _u5143_u8868 = { }
342 end
343 end
344end
345do
346 local _u5143_u8868, _u51cf_u51fd_u6570
347 do
348 local _obj_0 = _u5bf9_u8c61tb
349 _u5143_u8868, _u51cf_u51fd_u6570 = getmetatable(_obj_0["x字段"]), getmetatable(_obj_0["x字段"]).__sub
350 if _u5143_u8868 == nil then
351 _u5143_u8868 = { }
352 end
353 end
354end
355do
356 local _u5143_u7d20a, _u5143_u7d20b
357 do
358 local _obj_0 = _u5bf9_u8c61tb
359 local _tmp_0
360 _u5143_u7d20a, _u5143_u7d20b, _tmp_0 = _obj_0[1], _obj_0[2], _obj_0["字段c"][1]
361 if _u5143_u7d20a == nil then
362 _u5143_u7d20a = 1
363 end
364 if _u5143_u7d20b == nil then
365 _u5143_u7d20b = 2
366 end
367 if _tmp_0 == nil then
368 _tmp_0 = 3
369 end
370 _u5bf9_u50cfd["字段e"] = _tmp_0
371 end
372 local _list_0 = _u5143_u7ec4_u5217_u8868
373 for _index_0 = 1, #_list_0 do
374 local _des_0 = _list_0[_index_0]
375 local _u5de6, _u53f3 = _des_0[1], _des_0[2]
376 if _u5de6 == nil then
377 _u5de6 = "null"
378 end
379 if _u53f3 == nil then
380 _u53f3 = false
381 end
382 _u6253_u5370(_u5de6, _u53f3)
383 end
384end
385do
386 local a_u5143_u7d20, b_u5143_u7d20
387 do
388 local _obj_0 = _u5bf9_u8c61tb
389 a_u5143_u7d20, b_u5143_u7d20 = _obj_0[2], _obj_0[4]
390 end
391end
392do
393 do
394 local _obj_0 = _u5bf9_u8c61x["字段x"]["字段x"]
395 local _tmp_0, _tmp_1 = _obj_0["字段x"], _obj_0["y字段"]
396 if _tmp_0 == nil then
397 _tmp_0 = 1
398 end
399 if _tmp_1 == nil then
400 _tmp_1 = 2
401 end
402 _u5bf9_u8c61a["字段b"] = _tmp_0
403 a_u5bf9_u8c61["c字段"] = _tmp_1
404 end
405end
406do
407 local _u5bbd, _u9ad8
408 do
409 local _obj_0 = _u89c6_u533a["尺寸"]
410 _u5bbd, _u9ad8 = _obj_0["宽"], _obj_0["高"]
411 end
412 local x_u5750_u6807, y_u5750_u6807
413 do
414 local _obj_0 = _u70b9
415 x_u5750_u6807, y_u5750_u6807 = _obj_0["x坐标"], _obj_0["y坐标"]
416 if x_u5750_u6807 == nil then
417 x_u5750_u6807 = 0.0
418 end
419 if y_u5750_u6807 == nil then
420 y_u5750_u6807 = 0.0
421 end
422 end
423end
424do
425 local _u53d8_u91cf1, _u53d8_u91cf2, _u53d8_u91cf3, _u53d8_u91cfd, _u53d8_u91cfe
426 local _u5143_u7d20b
427 do
428 local _obj_0, _obj_1, _obj_2, _obj_3, _obj_4 = _u51fd_u6570()
429 do
430 local _obj_5 = _u6570_u7ec4a
431 _obj_5[#_obj_5 + 1] = _obj_0
432 end
433 setmetatable(_u5bf9_u8c61c, _obj_4)
434 _u53d8_u91cf1, _u53d8_u91cf2, _u53d8_u91cf3, _u53d8_u91cfd, _u53d8_u91cfe = 1, 2, 3, _obj_1, _obj_3
435 _u5143_u7d20b = _obj_2[1]
436 end
437 local _u53d8_u91cfy1, _u53d8_u91cfy4
438 local _u5b57_u6bb5y2, _u5b57_u6bb5y3
439 do
440 local _obj_0, _obj_1 = _u51fd_u65702()
441 _u53d8_u91cfy1, _u53d8_u91cfy4 = _u51fd_u65701(), _obj_1
442 _u5b57_u6bb5y2, _u5b57_u6bb5y3 = _obj_0["字段y2"], _obj_0["字段y3"]
443 end
444end
445do
446 local _u53d8_u91cfv1, _u53d8_u91cfv2, _u53d8_u91cfv3, _u53d8_u91cfv4
447 do
448 local _obj_0 = _u5bf9_u8c61tb
449 local _tmp_0, _tmp_1 = 1 + 1, self.x
450 _u53d8_u91cfv1, _u53d8_u91cfv2, _u53d8_u91cfv3, _u53d8_u91cfv4 = _obj_0[ [["abc"]]], _obj_0[_tmp_0][1], _obj_0[_tmp_0][2], _obj_0[_tmp_1]
451 if _u53d8_u91cfv1 == nil then
452 _u53d8_u91cfv1 = 111
453 end
454 if _u53d8_u91cfv2 == nil then
455 _u53d8_u91cfv2 = 222
456 end
457 if _u53d8_u91cfv3 == nil then
458 _u53d8_u91cfv3 = 333
459 end
460 if _u53d8_u91cfv4 == nil then
461 _u53d8_u91cfv4 = 444
462 end
463 end
464 local _u53d8_u91cfv5, _u53d8_u91cfv6, _u53d8_u91cfv7
465 do
466 local _obj_0 = _u5bf9_u8c61tb2
467 local _tmp_2, _tmp_3 = _u51fd_u6570(), _u51fd_u65702()
468 _u53d8_u91cfv5, _u53d8_u91cfv6, _u53d8_u91cfv7 = _obj_0['x-y-z'], _obj_0[_tmp_2][_tmp_3], _obj_0[_tmp_2][1]
469 end
470end
471do
472 local _u503c, _u5143_u503c
473 do
474 local _obj_0 = _u5bf9_u8c61tb
475 _u503c = _obj_0[_u540d_u79f0]
476 _u5143_u503c = getmetatable(_obj_0)[_u540d_u79f0]
477 end
478end
479do
480 local tostring, add
481 do
482 local _obj_0 = getmetatable(_u5bf9_u8c61tb)
483 tostring, add = _obj_0.__tostring, _obj_0.__add
484 if tostring == nil then
485 tostring = (function()
486 return "名称"
487 end)
488 end
489 end
490 do
491 local _exp_0 = _u5bf9_u8c61tb
492 local _type_0 = type(_exp_0)
493 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
494 if _tab_0 then
495 local name, _u5143_u5b57_u6bb5
496 do
497 local _obj_0 = getmetatable(_exp_0)
498 name = _obj_0.__name
499 _u5143_u5b57_u6bb5 = _obj_0["123"]
500 if name == nil then
501 name = "项目"
502 end
503 end
504 if _u5143_u5b57_u6bb5 ~= nil then
505 _u6253_u5370(name, _u5143_u5b57_u6bb5)
506 end
507 end
508 end
509end
510do
511 local _u5bf9_u8c61tb = { }
512 do
513 local _tmp_0 = _u51fd_u6570c()
514 local _u53d8_u91cfv2 = _u5bf9_u8c61tb[_tmp_0]
515 end
516 local _u53d8_u91cfv1
517 do
518 local _obj_0 = getmetatable(_u5bf9_u8c61tb)
519 local _tmp_1 = _u53d8_u91cfa + _u53d8_u91cfb
520 _u53d8_u91cfv1 = _obj_0[_tmp_1]
521 end
522end
523do
524 local add, _u5b57_u6bb5
525 do
526 local _obj_0 = _u5bf9_u8c61tb
527 add, _u5b57_u6bb5 = getmetatable(_obj_0.a).__add, getmetatable(_obj_0.b)[_u5b57_u6bb5_u540d]
528 if add == nil then
529 add = _u52a0_u51fd_u6570
530 end
531 if _u5b57_u6bb5 == nil then
532 _u5b57_u6bb5 = 123
533 end
534 end
535 local _u5143_u5b57_u6bb5, _u53d8_u91cfabc, _u6709_u9ed8_u8ba4_u503c
536 do
537 local _obj_0 = getmetatable(_u5bf9_u8c61tb)
538 _u5143_u5b57_u6bb5, _u53d8_u91cfabc, _u6709_u9ed8_u8ba4_u503c = _obj_0["字段abc"], _obj_0[ [[任意 字符串]]], _obj_0['字符串']
539 if _u5143_u5b57_u6bb5 == nil then
540 _u5143_u5b57_u6bb5 = "默认值"
541 end
542 if _u53d8_u91cfabc == nil then
543 _u53d8_u91cfabc = 123
544 end
545 if _u6709_u9ed8_u8ba4_u503c == nil then
546 _u6709_u9ed8_u8ba4_u503c = { }
547 end
548 end
549 do
550 local _exp_0 = _u5bf9_u8c61tb
551 local _type_0 = type(_exp_0)
552 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
553 if _tab_0 then
554 do
555 local _obj_0 = _exp_0["字段a"]
556 local _type_1 = type(_obj_0)
557 if "table" == _type_1 or "userdata" == _type_1 then
558 do
559 local _obj_1 = getmetatable(_obj_0)
560 local _type_2 = type(_obj_1)
561 if "table" == _type_2 or "userdata" == _type_2 then
562 add = _obj_1.__add
563 end
564 end
565 end
566 end
567 do
568 local _obj_0 = _exp_0.b
569 local _type_1 = type(_obj_0)
570 if "table" == _type_1 or "userdata" == _type_1 then
571 do
572 local _obj_1 = getmetatable(_obj_0)
573 local _type_2 = type(_obj_1)
574 if "table" == _type_2 or "userdata" == _type_2 then
575 _u5b57_u6bb5 = _obj_1[_u5b57_u6bb5_u540d]
576 end
577 end
578 end
579 end
580 if add == nil then
581 add = _u52a0_u51fd_u6570
582 end
583 if _u5b57_u6bb5 == nil then
584 _u5b57_u6bb5 = 123
585 end
586 _u6253_u5370(add, _u5b57_u6bb5)
587 end
588 end
589 do
590 local _exp_0 = tb
591 local _type_0 = type(_exp_0)
592 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
593 if _tab_0 then
594 do
595 local _obj_0 = _exp_0["字段c"]
596 local _type_1 = type(_obj_0)
597 if "table" == _type_1 or "userdata" == _type_1 then
598 do
599 local _obj_1 = getmetatable(_obj_0)
600 local _type_2 = type(_obj_1)
601 if "table" == _type_2 or "userdata" == _type_2 then
602 _u5143_u5b57_u6bb5 = _obj_1["字段abc"]
603 end
604 end
605 end
606 end
607 if _u5143_u5b57_u6bb5 == nil then
608 _u5143_u5b57_u6bb5 = "默认值"
609 end
610 do
611 local _obj_0 = getmetatable(_exp_0)
612 do
613 local _obj_1 = _obj_0[ [[any string]]]
614 local _type_1 = type(_obj_1)
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
629 if _u6709_u9ed8_u8ba4_u503c == nil then
630 _u6709_u9ed8_u8ba4_u503c = { }
631 end
632 end
633 _u6253_u5370(_u5143_u5b57_u6bb5, _u53d8_u91cfabc, _u6709_u9ed8_u8ba4_u503c)
634 end
635 end
636end
637return nil
diff --git a/spec/outputs/unicode/do.lua b/spec/outputs/unicode/do.lua
new file mode 100644
index 0000000..f9c3079
--- /dev/null
+++ b/spec/outputs/unicode/do.lua
@@ -0,0 +1,48 @@
1do
2 _u6253_u5370("你好")
3 _u6253_u5370("世界")
4end
5local _u53d8_u91cfx
6do
7 _u6253_u5370("你好")
8 _u53d8_u91cfx = _u6253_u5370("世界")
9end
10local _u53d8_u91cfy
11do
12 local _u4e1c_u897f = "shhh"
13 _u53d8_u91cfy = function()
14 return "你好: " .. _u4e1c_u897f
15 end
16end
17local _
18_ = function()
19 if _u67d0_u6761_u4ef6 then
20 do
21 return "好的"
22 end
23 end
24end
25local _u53d8_u91cft = {
26 ["y字段"] = (function()
27 local _u6570_u5b57 = 100
28 return function(_u53c2_u6570x)
29 return _u53c2_u6570x + _u6570_u5b57
30 end
31 end)()
32}
33return function(_u53c2_u6570y, _u53c2_u6570k)
34 if _u53c2_u6570y == nil then
35 do
36 _u53d8_u91cfx = 10 + 2
37 _u53c2_u6570y = _u53d8_u91cfx
38 end
39 end
40 if _u53c2_u6570k == nil then
41 do
42 _u53c2_u6570k = "没啥"
43 end
44 end
45 do
46 return "啊"
47 end
48end
diff --git a/spec/outputs/unicode/existential.lua b/spec/outputs/unicode/existential.lua
new file mode 100644
index 0000000..7cc6089
--- /dev/null
+++ b/spec/outputs/unicode/existential.lua
@@ -0,0 +1,223 @@
1do
2 local _obj_0 = _u51fd_u65701
3 if _obj_0 ~= nil then
4 _obj_0()
5 end
6end
7do
8 local _obj_0 = _u51fd_u65702
9 if _obj_0 ~= nil then
10 _obj_0("参数0", 123)
11 end
12end
13local _u53d8_u91cfx
14do
15 local _obj_0 = _u8868
16 if _obj_0 ~= nil then
17 _u53d8_u91cfx = _obj_0["值"]
18 end
19end
20_u6253_u5370((function()
21 local _obj_0 = _u5bf9_u8c61abc
22 if _obj_0 ~= nil then
23 local _obj_1 = _obj_0["你好 世界"]
24 if _obj_1 ~= nil then
25 return _obj_1["字段xyz"]
26 end
27 return nil
28 end
29 return nil
30end)())
31if _u6253_u5370 and (_u53d8_u91cfx ~= nil) then
32 _u6253_u5370(_u53d8_u91cfx)
33end
34do
35 local _obj_0 = self
36 if _obj_0 ~= nil then
37 _obj_0["函数"](_obj_0, 998)
38 end
39end
40do
41 local _with_0
42 do
43 local _obj_0 = _u5bf9_u8c61abc
44 if _obj_0 ~= nil then
45 do
46 local _obj_1 = _obj_0()
47 local _obj_2 = _obj_1["函数"]
48 if _obj_2 ~= nil then
49 _with_0 = _obj_2(_obj_1)
50 end
51 end
52 end
53 end
54 if (function()
55 local _obj_0 = _with_0["函数p"]
56 if _obj_0 ~= nil then
57 return _obj_0(_with_0, "abc")
58 end
59 return nil
60 end)() then
61 return 123
62 end
63end
64do
65 local _des_0
66 do
67 local _obj_0 = _u5bf9_u8c61a
68 if _obj_0 ~= nil then
69 do
70 local _obj_1 = _obj_0["如果"]
71 if _obj_1 ~= nil then
72 do
73 local _obj_2 = _obj_1["然后"]
74 if _obj_2 ~= nil then
75 do
76 local _obj_3 = _obj_2(_obj_1, 123)
77 if _obj_3 ~= nil then
78 _des_0 = _obj_3((function()
79 local _obj_4 = self
80 if _obj_4 ~= nil then
81 return _obj_4["方法"](_obj_4, 998)
82 end
83 return nil
84 end)())
85 end
86 end
87 end
88 end
89 end
90 end
91 end
92 end
93 if _des_0 then
94 local x_u5b57_u6bb5 = _des_0["x字段"]
95 _u6253_u5370(x_u5b57_u6bb5)
96 end
97end
98local _u7ed3_u679c = ((function()
99 local _call_0 = _u5bf9_u8c61b["方法"]
100 local _obj_0 = _call_0["执行"](_call_0)
101 local _obj_1 = _obj_0["当"]
102 if _obj_1 ~= nil then
103 local _call_1 = _obj_1(_obj_0, "没问题")
104 local _base_0 = _call_1["如果"](_call_1, "默认", 998)
105 local _fn_0 = _base_0["函数"]
106 return _fn_0 and function(...)
107 return _fn_0(_base_0, ...)
108 end
109 end
110 return nil
111end)() ~= nil)
112_u6253_u5370(_u7ed3_u679c)
113local _u81ea_u6211_u4e3a_u4e2d_u5fc3
114if (_u601d_u60f3 ~= nil) and not (_u4e16_u754c ~= nil) then
115 _u81ea_u6211_u4e3a_u4e2d_u5fc3 = true
116end
117local _u901f_u5ea6 = 0
118_u901f_u5ea6 = _u901f_u5ea6 or 15
119local _u811a_u5370 = _u91ce_u4eba or "熊"
120local _u4e13_u4e1a = '计算机科学'
121if not (_u4e13_u4e1a ~= nil) then
122 _u9009_u4fee_u8bfe_u7a0b('葡萄酒入门')
123end
124if (_u7a97_u4f53 ~= nil) then
125 local _u73af_u5883 = '浏览器(有可能)'
126end
127local _u90ae_u7f16
128do
129 local _obj_0 = _u62bd_u5956["中奖者"]
130 if _obj_0 ~= nil then
131 do
132 local _obj_1 = _obj_0()["地址"]
133 if _obj_1 ~= nil then
134 _u90ae_u7f16 = _obj_1["邮政编码"]
135 end
136 end
137 end
138end
139local _u957f_u5ea6 = (function()
140 local _obj_0 = utf8
141 if _obj_0 ~= nil then
142 return _obj_0["长度"]
143 end
144 return nil
145end)() or (function()
146 local _obj_0 = _u5b57_u7b26_u4e32
147 if _obj_0 ~= nil then
148 return _obj_0["长度"]
149 end
150 return nil
151end)() or function(_u5bf9_u8c61)
152 return #_u5bf9_u8c61
153end
154local _u53d8_u91cfa
155do
156 local _obj_0 = _u88681
157 if _obj_0 ~= nil then
158 do
159 local _obj_1 = _obj_0["结束"]
160 if _obj_1 ~= nil then
161 _u53d8_u91cfa = _obj_1(_obj_0, 123 + (function()
162 local _obj_2 = _u88682
163 if _obj_2 ~= nil then
164 return _obj_2["然后"](_obj_2, 456)
165 end
166 return nil
167 end)())
168 end
169 end
170 end
171end
172local _u53d8_u91cfb = ((function()
173 local _obj_0 = _u88681
174 if _obj_0 ~= nil then
175 local _base_0 = _obj_0
176 local _fn_0 = _base_0["结束"]
177 return _fn_0 and function(...)
178 return _fn_0(_base_0, ...)
179 end
180 end
181 return nil
182end)() ~= nil) or (function()
183 local _obj_0 = _u88682
184 if _obj_0 ~= nil then
185 local _base_0 = _obj_0
186 local _fn_0 = _base_0["然后"]
187 return _fn_0 and function(...)
188 return _fn_0(_base_0, ...)
189 end
190 end
191 return nil
192end)()
193do
194 local _with_0 = io.open("测试.txt", "w")
195 if _with_0 ~= nil then
196 _with_0:write("你好")
197 _with_0:close()
198 end
199end
200do
201 local _obj_0 = _u8868
202 if _obj_0 ~= nil then
203 do
204 local _obj_1 = getmetatable(_obj_0).__call
205 if _obj_1 ~= nil then
206 _obj_1(123)
207 end
208 end
209 end
210end
211do
212 local _with_0
213 do
214 local _obj_0 = getmetatable(_u8868)
215 if _obj_0 ~= nil then
216 _with_0 = getmetatable(_obj_0).__index
217 end
218 end
219 if _with_0 ~= nil then
220 _with_0["字段a"] = 1
221 end
222end
223return nil
diff --git a/spec/outputs/unicode/export.lua b/spec/outputs/unicode/export.lua
new file mode 100644
index 0000000..ef35fe5
--- /dev/null
+++ b/spec/outputs/unicode/export.lua
@@ -0,0 +1,338 @@
1local _module_0 = setmetatable({ }, { })
2local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = 223, 343, 123
3_module_0["变量a"], _module_0["变量b"], _module_0["变量c"] = _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc
4local _u9177 = "🧧"
5_module_0["酷"] = _u9177
6local _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff = 3, 2, 1
7_module_0[#_module_0 + 1] = _u53d8_u91cfd
8_module_0[#_module_0 + 1] = _u53d8_u91cfe
9_module_0[#_module_0 + 1] = _u53d8_u91cff
10local _u67d0_u7c7b
11do
12 local _class_0
13 local _base_0 = {
14 ["嗯"] = "酷"
15 }
16 if _base_0.__index == nil then
17 _base_0.__index = _base_0
18 end
19 _class_0 = setmetatable({
20 __init = function() end,
21 __base = _base_0,
22 __name = "某类"
23 }, {
24 __index = _base_0,
25 __call = function(cls, ...)
26 local _self_0 = setmetatable({ }, _base_0)
27 cls.__init(_self_0, ...)
28 return _self_0
29 end
30 })
31 _base_0.__class = _class_0
32 _u67d0_u7c7b = _class_0
33end
34_module_0["_u67d0_u7c7b"] = _u67d0_u7c7b
35if _u8fd9_u4e2a then
36 _module_0[#_module_0 + 1] = 232
37else
38 _module_0[#_module_0 + 1] = 4343
39end
40local _u4ec0_u4e48
41if _u8fd9_u4e2a then
42 _u4ec0_u4e48 = 232
43else
44 _u4ec0_u4e48 = 4343
45end
46_module_0["什么"] = _u4ec0_u4e48
47local _u53d8_u91cfy
48_u53d8_u91cfy = function()
49 local _u4f60_u597d = 3434
50end
51_module_0["变量y"] = _u53d8_u91cfy
52do
53 local _with_0 = _u4e34_u65f6
54 local _u53d8_u91cfj = 2000
55 _module_0[#_module_0 + 1] = _with_0
56end
57local cb_u7684_u503c
58do
59 local _u53d8_u91cfh = 100
60 cb_u7684_u503c = _u51fd_u6570(function(_u53c2_u6570)
61 return _u53c2_u6570(h_u53d8_u91cf)
62 end)
63end
64_module_0["cb的值"] = cb_u7684_u503c
65local _u4e2b_u4e2b
66_u4e2b_u4e2b = function()
67 local _u53d8_u91cfh = 100
68 local _u53d8_u91cfk = 100
69end
70_module_0["丫丫"] = _u4e2b_u4e2b
71do
72 local _exp_0 = _u53d8_u91cfh
73 if 100 == _exp_0 or 150 == _exp_0 then
74 _module_0[#_module_0 + 1] = 200
75 elseif 200 == _exp_0 then
76 _module_0[#_module_0 + 1] = 300
77 else
78 _module_0[#_module_0 + 1] = 0
79 end
80end
81local _u5e38_u91cf
82do
83 local _exp_0 = _u503c
84 if "好" == _exp_0 then
85 _u5e38_u91cf = 1
86 elseif "更好" == _exp_0 then
87 _u5e38_u91cf = 2
88 elseif "最好" == _exp_0 then
89 _u5e38_u91cf = 3
90 end
91end
92_module_0["常量"] = _u5e38_u91cf
93local _u9879_u76ee = _u51fd_u6570(123)
94_module_0["项目"] = _u9879_u76ee
95_module_0[#_module_0 + 1] = _u53d8_u91cfx
96_u51fd_u6570((function()
97 if _u6761_u4ef6a then
98 return _u503cb
99 end
100end)())
101_u51fd_u6570((function()
102 return 123
103end)())
104_u51fd_u6570((function()
105 local _exp_0 = _u5bf9_u8c61a
106 if _u53d8_u91cfb == _exp_0 then
107 return _u503cc
108 end
109end)())
110_u51fd_u6570((function()
111 local _accum_0 = { }
112 local _len_0 = 1
113 for _u8ba1_u6570 = 1, 10 do
114 _accum_0[_len_0] = _u8ba1_u6570
115 _len_0 = _len_0 + 1
116 end
117 return _accum_0
118end)())
119_u51fd_u6570((function()
120 local _accum_0 = { }
121 local _len_0 = 1
122 for _u8ba1_u6570 = 1, 10 do
123 _accum_0[_len_0] = _u8ba1_u6570
124 _len_0 = _len_0 + 1
125 end
126 return _accum_0
127end)())
128_u51fd_u6570((function()
129 local _tbl_0 = { }
130 for _u952e, _u503c in pairs(_u8868) do
131 _tbl_0[_u952e] = _u503c
132 end
133 return _tbl_0
134end)())
135_u51fd_u6570((function()
136 local _accum_0 = { }
137 local _len_0 = 1
138 for _u952e, _u503c in pairs(_u8868) do
139 _accum_0[_len_0] = {
140 _u952e,
141 _u503c
142 }
143 _len_0 = _len_0 + 1
144 end
145 return _accum_0
146end)())
147_u51fd_u6570((function()
148 local _accum_0 = { }
149 local _len_0 = 1
150 while _u6761_u4ef6a do
151 _accum_0[_len_0] = true
152 _len_0 = _len_0 + 1
153 end
154 return _accum_0
155end)())
156_u51fd_u6570((function()
157 local _with_0 = _u6761_u4ef6a
158 _with_0["字段b"] = 123
159 return _with_0
160end)())
161_u51fd_u6570((function()
162 local _obj_0 = _u5bf9_u8c61a
163 if _obj_0 ~= nil then
164 return _obj_0["字段b"]
165 end
166 return nil
167end)())
168_u51fd_u6570((function()
169 local _base_0 = _u5bf9_u8c61a
170 local _fn_0 = _base_0["字段b"]
171 return _fn_0 and function(...)
172 return _fn_0(_base_0, ...)
173 end
174end)())
175_u51fd_u6570((function()
176 local A_u7c7b
177 do
178 local _class_0
179 local _base_0 = { }
180 if _base_0.__index == nil then
181 _base_0.__index = _base_0
182 end
183 _class_0 = setmetatable({
184 __init = function() end,
185 __base = _base_0,
186 __name = "A类"
187 }, {
188 __index = _base_0,
189 __call = function(cls, ...)
190 local _self_0 = setmetatable({ }, _base_0)
191 cls.__init(_self_0, ...)
192 return _self_0
193 end
194 })
195 _base_0.__class = _class_0
196 A_u7c7b = _class_0
197 return _class_0
198 end
199end)())
200local _ = tostring((function()
201 if _u6761_u4ef6a then
202 return _u503cb
203 end
204end)())
205_ = tostring((function()
206 return 123
207end)())
208_ = tostring((function()
209 local _exp_0 = _u5bf9_u8c61a
210 if _u53d8_u91cfb == _exp_0 then
211 return _u503cc
212 end
213end)())
214_ = tostring((function()
215 local _accum_0 = { }
216 local _len_0 = 1
217 for _u8ba1_u6570 = 1, 10 do
218 _accum_0[_len_0] = _u8ba1_u6570
219 _len_0 = _len_0 + 1
220 end
221 return _accum_0
222end)())
223_ = tostring((function()
224 local _accum_0 = { }
225 local _len_0 = 1
226 for _u8ba1_u6570 = 1, 10 do
227 _accum_0[_len_0] = _u8ba1_u6570
228 _len_0 = _len_0 + 1
229 end
230 return _accum_0
231end)())
232_ = tostring((function()
233 local _tbl_0 = { }
234 for _u952e, _u503c in pairs(_u8868) do
235 _tbl_0[_u952e] = _u503c
236 end
237 return _tbl_0
238end)())
239_ = tostring((function()
240 local _accum_0 = { }
241 local _len_0 = 1
242 for _u952e, _u503c in pairs(_u8868) do
243 _accum_0[_len_0] = {
244 _u952e,
245 _u503c
246 }
247 _len_0 = _len_0 + 1
248 end
249 return _accum_0
250end)())
251_ = tostring((function()
252 local _accum_0 = { }
253 local _len_0 = 1
254 while _u6761_u4ef6a do
255 _accum_0[_len_0] = true
256 _len_0 = _len_0 + 1
257 end
258 return _accum_0
259end)())
260_ = tostring((function()
261 local _with_0 = _u5bf9_u8c61a
262 _with_0["字段b"] = 123
263 return _with_0
264end)())
265_ = tostring((function()
266 local _obj_0 = _u5bf9_u8c61a
267 if _obj_0 ~= nil then
268 return _obj_0["字段b"]
269 end
270 return nil
271end)())
272_ = tostring((function()
273 local _base_0 = _u5bf9_u8c61a
274 local _fn_0 = _base_0["字段b"]
275 return _fn_0 and function(...)
276 return _fn_0(_base_0, ...)
277 end
278end)())
279_ = tostring((function()
280 local A_u7c7b
281 do
282 local _class_0
283 local _base_0 = { }
284 if _base_0.__index == nil then
285 _base_0.__index = _base_0
286 end
287 _class_0 = setmetatable({
288 __init = function() end,
289 __base = _base_0,
290 __name = "A类"
291 }, {
292 __index = _base_0,
293 __call = function(cls, ...)
294 local _self_0 = setmetatable({ }, _base_0)
295 cls.__init(_self_0, ...)
296 return _self_0
297 end
298 })
299 _base_0.__class = _class_0
300 A_u7c7b = _class_0
301 return _class_0
302 end
303end)())
304local _u53d8_u91cf1, _u53d8_u91cf2, _u53d8_u91cf3, _u7c7b4, _u53d8_u91cf5
305_u53d8_u91cf1 = 1
306_u53d8_u91cf2 = 2
307_module_0["变量2"] = _u53d8_u91cf2
308do
309 local _class_0
310 local _base_0 = { }
311 if _base_0.__index == nil then
312 _base_0.__index = _base_0
313 end
314 _class_0 = setmetatable({
315 __init = function() end,
316 __base = _base_0,
317 __name = "类4"
318 }, {
319 __index = _base_0,
320 __call = function(cls, ...)
321 local _self_0 = setmetatable({ }, _base_0)
322 cls.__init(_self_0, ...)
323 return _self_0
324 end
325 })
326 _base_0.__class = _class_0
327 _u7c7b4 = _class_0
328 _u53d8_u91cf3 = _class_0
329end
330_module_0["变量3"] = _u53d8_u91cf3
331_u53d8_u91cf5 = 5
332getmetatable(_module_0)["🀄️"] = 1
333getmetatable(_module_0).__name = "导出"
334getmetatable(_module_0).__call = function(self)
335 return { }
336end
337_module_0["导出-任意-名称"] = 123
338return _module_0
diff --git a/spec/outputs/unicode/export_default.lua b/spec/outputs/unicode/export_default.lua
new file mode 100644
index 0000000..6d48af2
--- /dev/null
+++ b/spec/outputs/unicode/export_default.lua
@@ -0,0 +1,19 @@
1local _module_0 = nil
2_u6253_u5370("没问题")
3_module_0 = function()
4 _u6253_u5370("你好")
5 return 123
6end
7if not _u662f_u5426_u7ed3_u675f then
8 _u51fd_u6570(123, "abc", function(_u53c2_u6570x, _u56de_u8c03y)
9 _u6253_u5370(_u53c2_u6570x)
10 return _u56de_u8c03y(function(_u53c2_u6570y, _u7ed3_u679c)
11 if _u7ed3_u679c then
12 return _u53d8_u91cfabc + _u53c2_u6570y
13 else
14 return _u53d8_u91cfabc
15 end
16 end)
17 end)
18end
19return _module_0
diff --git a/spec/outputs/unicode/funcs.lua b/spec/outputs/unicode/funcs.lua
new file mode 100644
index 0000000..6e94587
--- /dev/null
+++ b/spec/outputs/unicode/funcs.lua
@@ -0,0 +1,222 @@
1local _u53d8_u91cfx
2_u53d8_u91cfx = function()
3 return _u6253_u5370(_u4ec0_u4e48)
4end
5local __u65e0_u6548_u53d8_u91cf
6__u65e0_u6548_u53d8_u91cf = function() end
7__u65e0_u6548_u53d8_u91cf = function()
8 return function()
9 return function() end
10 end
11end
12_u5230(_u8c37(_u4ed3(_u53bb)))
13_u5f00(function()
14 return _u8fd9_u6247(function()
15 return _u95e8
16 end)
17end)
18_u5f00(function()
19 _u8fd9_u6247(_u95e8)
20 local _u4f60_u597d
21 _u4f60_u597d = function()
22 return _u6211_u7684(_u51fd_u6570)
23 end
24end)
25local _u53d8_u91cfh
26_u53d8_u91cfh = function()
27 return _ud83d_udc4b
28end
29_u5403(function() end, _u4e16_u754c);
30(function() end)()
31_u53d8_u91cfx = function(...) end
32_u4f60_u597d()
33_u4f60_u597d["世界"]()
34__u65e0_u6548_u53d8_u91cf = _u4f60_u597d()["某物"]
35__u65e0_u6548_u53d8_u91cf = _u4ec0_u4e48()["🥵🥵🥵"]
36_u4ec0()(_u4e48()(_u60c5_u51b5()))
37__u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c, _u53c2_u6570d, _u53c2_u6570e) end
38__u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570, _u53c2_u6570, _u53c2_u6570, _u53c2_u6570, _u53c2_u6570)
39 return _u6253_u5370(_u53c2_u6570)
40end
41__u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570x)
42 if _u53c2_u6570x == nil then
43 _u53c2_u6570x = 23023
44 end
45end
46__u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570x)
47 if _u53c2_u6570x == nil then
48 _u53c2_u6570x = function(_u53c2_u6570y)
49 if _u53c2_u6570y == nil then
50 _u53c2_u6570y = function() end
51 end
52 end
53 end
54end
55__u65e0_u6548_u53d8_u91cf = function(_u53d8_u91cfx)
56 if _u53d8_u91cfx == nil then
57 if _u67d0_u7269 then
58 _u53d8_u91cfx = _u597d
59 else
60 _u53d8_u91cfx = _u574f
61 end
62 end
63end
64local _u67d0_u7269
65_u67d0_u7269 = function(_u4f60_u597d, _u4e16_u754c)
66 if _u4f60_u597d == nil then
67 _u4f60_u597d = 100
68 end
69 if _u4e16_u754c == nil then
70 _u4e16_u754c = function(_u53c2_u6570x)
71 if _u53c2_u6570x == nil then
72 _u53c2_u6570x = [[好 酷]]
73 end
74 return _u6253_u5370("吃米饭")
75 end
76 end
77 return _u6253_u5370(_u4f60_u597d)
78end
79__u65e0_u6548_u53d8_u91cf = function(self) end
80__u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x, _u53c2_u6570y) end
81__u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x, _u53c2_u6570y)
82 self["参数x"] = _u53c2_u6570x
83 self["参数y"] = _u53c2_u6570y
84end
85__u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x)
86 if _u53c2_u6570x == nil then
87 _u53c2_u6570x = 1
88 end
89end
90__u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x, _u53c2_u6570y, _u53c2_u6570z)
91 if _u53c2_u6570x == nil then
92 _u53c2_u6570x = 1
93 end
94 if _u53c2_u6570z == nil then
95 _u53c2_u6570z = "你好 世界"
96 end
97 self["参数x"] = _u53c2_u6570x
98 self["参数z"] = _u53c2_u6570z
99end
100_u53d8_u91cfx(function()
101 return
102end)
103_u53d8_u91cfy(function()
104 return 1
105end)
106_u53d8_u91cfz(function()
107 return 1, "你好", "世界"
108end)
109_u53d8_u91cfk(function()
110 if _u662f then
111 return
112 else
113 return
114 end
115end)
116__u65e0_u6548_u53d8_u91cf = function()
117 if _u67d0_u7269 then
118 return _u771f_u540d
119 end
120end
121_u51fd_u6570d(function()
122 return _u6253_u5370("你好 世界")
123end, 10)
124_u51fd_u6570d(1, 2, 3, 4, 5, 6, (function()
125 if _u67d0_u7269 then
126 _u6253_u5370("okay")
127 return 10
128 end
129end)(), 10, 20)
130_u51fd_u6570f()()(_u4ec0_u4e48)(function()
131 return _u6253_u5370("srue")
132end, 123)
133_u53d8_u91cfx = function(_u53c2_u6570a, _u53c2_u6570b)
134 return _u6253_u5370("什么")
135end
136local _u53d8_u91cfy
137_u53d8_u91cfy = function(_u53c2_u6570a, _u53c2_u6570b)
138 if _u53c2_u6570a == nil then
139 _u53c2_u6570a = "hi"
140 end
141 if _u53c2_u6570b == nil then
142 _u53c2_u6570b = 23
143 end
144 return _u6253_u5370("什么")
145end
146local _u53d8_u91cfz
147_u53d8_u91cfz = function(_u53c2_u6570a, _u53c2_u6570b)
148 if _u53c2_u6570a == nil then
149 _u53c2_u6570a = "hi"
150 end
151 if _u53c2_u6570b == nil then
152 _u53c2_u6570b = 23
153 end
154 return _u6253_u5370("什么")
155end
156local _u53d8_u91cfj
157_u53d8_u91cfj = function(_u53c2_u6570f, _u53c2_u6570g, _u53c2_u6570m, _u53c2_u6570a, _u53c2_u6570b)
158 if _u53c2_u6570a == nil then
159 _u53c2_u6570a = "hi"
160 end
161 if _u53c2_u6570b == nil then
162 _u53c2_u6570b = 23
163 end
164 return _u6253_u5370("什么")
165end
166_u53d8_u91cfy = function(_u53c2_u6570a, _u53c2_u6570b, ...)
167 if _u53c2_u6570a == nil then
168 _u53c2_u6570a = "hi"
169 end
170 if _u53c2_u6570b == nil then
171 _u53c2_u6570b = 23
172 end
173 return _u6253_u5370("什么")
174end
175_u53d8_u91cfy = function(_u53c2_u6570a, _u53c2_u6570b, ...)
176 if _u53c2_u6570a == nil then
177 _u53c2_u6570a = "hi"
178 end
179 if _u53c2_u6570b == nil then
180 _u53c2_u6570b = 23
181 end
182 return _u6253_u5370("什么")
183end
184local _u591a_u53c2_u6570
185_u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b)
186 return _u6253_u5370("什么")
187end
188_u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b)
189 if _u53c2_u6570a == nil then
190 _u53c2_u6570a = "hi"
191 end
192 if _u53c2_u6570b == nil then
193 _u53c2_u6570b = 23
194 end
195 return _u6253_u5370("什么")
196end
197_u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b)
198 if _u53c2_u6570a == nil then
199 _u53c2_u6570a = "hi"
200 end
201 if _u53c2_u6570b == nil then
202 _u53c2_u6570b = 23
203 end
204 return _u6253_u5370("什么")
205end
206_u591a_u53c2_u6570 = function(_u53c2_u6570f, _u53c2_u6570g, _u53c2_u6570m, _u53c2_u6570a, _u53c2_u6570b)
207 if _u53c2_u6570a == nil then
208 _u53c2_u6570a = "hi"
209 end
210 if _u53c2_u6570b == nil then
211 _u53c2_u6570b = 23
212 end
213 return _u6253_u5370("什么")
214end
215local self
216self = function(_u53c2_u6570n)
217 if _u53c2_u6570n == 0 then
218 return 1
219 end
220 return _u53c2_u6570n * self(_u53c2_u6570n - 1)
221end
222return nil
diff --git a/spec/outputs/unicode/global.lua b/spec/outputs/unicode/global.lua
new file mode 100644
index 0000000..c91db52
--- /dev/null
+++ b/spec/outputs/unicode/global.lua
@@ -0,0 +1,91 @@
1do
2 _u5168_u5c40_u53d8_u91cfa, _u5168_u5c40_u53d8_u91cfb, _u5168_u5c40_u53d8_u91cfc = 223, 343, nil
3 _u9177 = "📉"
4end
5do
6 do
7 local _class_0
8 local _base_0 = {
9 ["嗯"] = "🆒"
10 }
11 if _base_0.__index == nil then
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
29end
30do
31 local _u53d8_u91cfc, _u53d8_u91cfd
32 _u5168_u5c40_u53d8_u91cfa, _u5168_u5c40_u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd = "你好", nil, nil, nil
33end
34do
35 local _u4ec0_u4e48
36 if _u8fd9_u4e2a then
37 _u4ec0_u4e48 = 232
38 else
39 _u4ec0_u4e48 = 4343
40 end
41 local _u53e6_u4e00_u4e2a = 3434
42 A_u53e6_u4e00_u4e2a = 7890
43 if _u5185_u90e8 then
44 local Y_u597d = "10000"
45 end
46 if _u8fd9_u4e2a then
47 _u4ec0_u4e48 = 232
48 else
49 _u4ec0_u4e48 = 4343
50 end
51end
52do
53 if _u8fd9_u4e2a then
54 _u4ec0_u4e48 = 232
55 else
56 _u4ec0_u4e48 = 4343
57 end
58 _u5168_u5c40_u53d8_u91cfx, _u5168_u5c40_u53d8_u91cfy, _u5168_u5c40_u53d8_u91cfz = 1, 2, 3
59 _u5168_u5c40_u53d8_u91cfy = function()
60 local _u597d_u7684 = 3434
61 end
62 do
63 local _with_0 = _u5168_u5c40_u4e34_u65f6_u53d8_u91cf
64 local _u53d8_u91cfj = 2000
65 end
66end
67do
68 _u53d8_u91cfx = 3434
69 if _u6761_u4ef6y then
70 _u53d8_u91cfx = 10
71 end
72end
73do
74 if _u6761_u4ef6y then
75 local _u53d8_u91cfx = 10
76 end
77 _u53d8_u91cfx = 3434
78end
79do
80 do
81 _u53d8_u91cfk = 1212
82 do
83 local _u53d8_u91cfh = 100
84 end
85 _u5168_u5c40_u53d8_u91cfy = function()
86 local _u53d8_u91cfh = 100
87 _u53d8_u91cfk = 100
88 end
89 end
90 local _u53d8_u91cfh = 100
91end
diff --git a/spec/outputs/unicode/goto.lua b/spec/outputs/unicode/goto.lua
new file mode 100644
index 0000000..8e2e5a6
--- /dev/null
+++ b/spec/outputs/unicode/goto.lua
@@ -0,0 +1,67 @@
1do
2 local _u53d8_u91cfa = 0
3 ::_u5f00_u59cb::
4 _u53d8_u91cfa = _u53d8_u91cfa + 1
5 if _u53d8_u91cfa == 5 then
6 goto _u7ed3_u675f
7 end
8 goto _u5f00_u59cb
9 ::_u7ed3_u675f::
10end
11do
12 for _u8ba1_u6570z = 1, 10 do
13 for _u8ba1_u6570y = 1, 10 do
14 for _u8ba1_u6570x = 1, 10 do
15 if _u8ba1_u6570x ^ 2 + _u8ba1_u6570y ^ 2 == _u8ba1_u6570z ^ 2 then
16 _u6253_u5370('找到了毕达哥拉斯三元组:', _u8ba1_u6570x, _u8ba1_u6570y, _u8ba1_u6570z)
17 goto _u5b8c_u6210
18 end
19 end
20 end
21 end
22 ::_u5b8c_u6210::
23end
24do
25 for _u8ba1_u6570z = 1, 10 do
26 for _u8ba1_u6570y = 1, 10 do
27 for _u8ba1_u6570x = 1, 10 do
28 if _u8ba1_u6570x ^ 2 + _u8ba1_u6570y ^ 2 == _u8ba1_u6570z ^ 2 then
29 _u6253_u5370('找到了毕达哥拉斯三元组:', _u8ba1_u6570x, _u8ba1_u6570y, _u8ba1_u6570z)
30 _u6253_u5370('now trying next z...')
31 goto _u7ee7_u7eedz
32 end
33 end
34 end
35 ::_u7ee7_u7eedz::
36 end
37end
38do
39 ::_u91cd_u505a::
40 for _u8ba1_u6570x = 1, 10 do
41 for _u8ba1_u6570y = 1, 10 do
42 if not _u51fd_u6570f(_u8ba1_u6570x, _u8ba1_u6570y) then
43 goto _u7ee7_u7eed
44 end
45 if not _u51fd_u6570g(_u8ba1_u6570x, _u8ba1_u6570y) then
46 goto _u8df3_u8fc7
47 end
48 if not _u51fd_u6570h(_u8ba1_u6570x, _u8ba1_u6570y) then
49 goto _u91cd_u505a
50 end
51 ::_u7ee7_u7eed::
52 end
53 end
54 ::_u8df3_u8fc7::
55end
56do
57 local _list_0 = _u5217_u8868
58 for _index_0 = 1, #_list_0 do
59 local _u53d8_u91cf = _list_0[_index_0]
60 if _u53d8_u91cf % 2 == 0 then
61 _u6253_u5370('列表有偶数')
62 goto _u6709
63 end
64 end
65 _u6253_u5370('列表没偶数')
66 ::_u6709::
67end
diff --git a/spec/outputs/unicode/import.lua b/spec/outputs/unicode/import.lua
new file mode 100644
index 0000000..50acc11
--- /dev/null
+++ b/spec/outputs/unicode/import.lua
@@ -0,0 +1,112 @@
1local _u4f60_u597d = _u597d_u7684["你好"]
2local _u597d_u5440, _u4e16_u754c
3do
4 local _obj_0 = _u8868["酷"]
5 _u597d_u5440, _u4e16_u754c = _obj_0["好呀"], _obj_0["世界"]
6end
7local _u5b57_u6bb5x, _u5b57_u6bb5y, _u5b57_u6bb5z = _u9053_u5177_u7ec4["字段x"], (function()
8 local _base_0 = _u9053_u5177_u7ec4
9 local _fn_0 = _base_0["字段y"]
10 return _fn_0 and function(...)
11 return _fn_0(_base_0, ...)
12 end
13end)(), _u9053_u5177_u7ec4["字段z"]
14local _u9886_u4e3b, _ud83d_udc7b
15do
16 local _obj_0 = _u627e_u5230("我的表")
17 _u9886_u4e3b, _ud83d_udc7b = _obj_0["领主"], (function()
18 local _base_0 = _obj_0
19 local _fn_0 = _base_0["👻"]
20 return _fn_0 and function(...)
21 return _fn_0(_base_0, ...)
22 end
23 end)()
24end
25local _obj_0 = 232
26local _u67d0_u7269
27do
28 local _obj_1 = _u4e00_u4e2a(_u8868_u683c)
29 _u67d0_u7269 = _obj_1["某物"]
30end
31if _u7f29_u8fdb then
32 local _u597d_u5427, _u5f88_u597d
33 do
34 local _obj_1 = _u5f88_u591a_u8868[100]
35 _u597d_u5427, _u5f88_u597d = _obj_1["好吧"], (function()
36 local _base_0 = _obj_1
37 local _fn_0 = _base_0["很好"]
38 return _fn_0 and function(...)
39 return _fn_0(_base_0, ...)
40 end
41 end)()
42 end
43end
44do
45 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"]
46end
47do
48 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"]
49end
50do
51 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"]
52end
53do
54 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"]
55end
56do
57 local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"]
58end
59do
60 local _u6a21_u5757 = require('模块')
61 _u6253_u5370(_u6a21_u5757)
62 local _u6a21_u5757_x = require('模块_x')
63 _u6253_u5370(_u6a21_u5757_x)
64 local _u4e0b__u5212__u7ebf__u6a21__u5757__u554a = require("下-划-线-模-块-啊")
65 _u6253_u5370(_u4e0b__u5212__u7ebf__u6a21__u5757__u554a)
66 local _u5b50_u6a21_u5757 = require("模块.子模块")
67 _u6253_u5370(_u5b50_u6a21_u5757)
68end
69do
70 local _u5927_u73a9_u5bb6 = require("小玩家")
71 local C, Ct, Cmt
72 do
73 local _obj_1 = require("lpeg库")
74 C, Ct, Cmt = _obj_1.C, _obj_1.Ct, _obj_1.Cmt
75 end
76 local _u4e00, _u4e8c, _u5b57_u7b26
77 do
78 local _obj_1 = require("导出")
79 _u4e00, _u4e8c, _u5b57_u7b26 = _obj_1[1], _obj_1[2], _obj_1["某键"]["嗯"][1]
80 end
81 local _u53c8_u4e00_u4e2a_u7ec4_u4ef6 = require("导出")["又一个组件"]
82 _u6253_u5370(_u53c8_u4e00_u4e2a_u7ec4_u4ef6)
83end
84do
85 _u6a21_u5757 = require('模块')
86 _u6a21_u5757_x = require('模块_x')
87 _u6a21_u5757_y = require("组织.包.模块-y")
88 _u6253_u5370(_u6a21_u5757_y)
89end
90do
91 local _u51fd_u6570, _u5982_u679c_u53d8_u91cf
92 do
93 local _obj_1 = require("组织.包.模块")
94 _u51fd_u6570, _u5982_u679c_u53d8_u91cf = _obj_1["函数体"], _obj_1["如果"]
95 end
96end
97do
98 local _u53d8_u91cfb = getmetatable(require("块")).__gc
99 local index = getmetatable(require("块")).__index
100 local _u53d8_u91cff, _u53d8_u91cfc
101 do
102 local _obj_1 = require("块")
103 _u53d8_u91cff = _obj_1["字段e"]
104 _u53d8_u91cfc = getmetatable(_obj_1).__pairs
105 end
106 local _u53d8_u91cfd = require("块")["字段c"]
107 local _u5143_u7d20g, _u53d8_u91cfi
108 do
109 local _obj_1 = require("块")
110 _u5143_u7d20g, _u53d8_u91cfi = _obj_1[1], getmetatable(_obj_1[2]).__close
111 end
112end
diff --git a/spec/outputs/unicode/in_expression.lua b/spec/outputs/unicode/in_expression.lua
new file mode 100644
index 0000000..62aad05
--- /dev/null
+++ b/spec/outputs/unicode/in_expression.lua
@@ -0,0 +1,181 @@
1_u51fd_u6570((function()
2 local _val_0 = -_u53d8_u91cfa ^ 2
3 return 1 == _val_0 or 2 == _val_0 or 3 == _val_0
4end)())
5local _u53d8_u91cfa, _u53d8_u91cfb = (function(...)
6 local _val_0 = _u51fd_u6570x(...)
7 return not (1 <= _val_0 and _val_0 <= 3)
8end)(...), 2
9local _u53d8_u91cfd
10do
11 local _val_0 = (_u5bf9_u8c61["字段x"]["字段y"](...))
12 _u53d8_u91cfd = not (1 <= _val_0 and _val_0 <= 3)
13end
14local _u5728_u7684
15do
16 local _val_0 = "东"
17 _u5728_u7684 = "东" == _val_0 or "西" == _val_0
18end
19if (1 == _u53d8_u91cfa) and (2 == _u53d8_u91cfb or 3 == _u53d8_u91cfb or 4 == _u53d8_u91cfb) or (function()
20 local _val_0 = _u53d8_u91cfc
21 return 1 <= _val_0 and _val_0 <= 10
22end)() then
23 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc)
24end
25do
26 local _exp_0 = _u503c
27 if 1 == _exp_0 or 2 == _exp_0 or 3 == _exp_0 then
28 _u6253_u5370("1, 2, 3")
29 elseif not (0 < _exp_0 and _exp_0 <= 100) then
30 _u6253_u5370("非 (0 < 值 <= 100)")
31 elseif (200 <= _exp_0 and _exp_0 < 300) then
32 _u6253_u5370("200 <= 值 < 300)")
33 elseif not (333 == _exp_0 or 444 == _exp_0 or 555 == _exp_0) then
34 _u6253_u5370("非 333, 444 或 555")
35 end
36end
37do
38 local _val_0 = _u53d8_u91cfy
39 return not (_u5f00_u59cb < _val_0 and _val_0 < _u7ed3_u675f)
40end
41do
42 local _u5b58_u5728
43 do
44 local _check_0 = _u8868
45 local _val_0 = _u5143_u7d20
46 local _find_0 = false
47 for _index_0 = 1, #_check_0 do
48 local _item_0 = _check_0[_index_0]
49 if _item_0 == _val_0 then
50 _find_0 = true
51 break
52 end
53 end
54 _u5b58_u5728 = _find_0
55 end
56 _u68c0_u67e5((function()
57 local _check_0 = _u8868
58 local _val_0 = _u5143_u7d20
59 for _index_0 = 1, #_check_0 do
60 if _check_0[_index_0] == _val_0 then
61 return true
62 end
63 end
64 return false
65 end)())
66end
67do
68 local _u5bf9_u8c61 = _u83b7_u53d6()
69 local _u5b58_u5728
70 do
71 local _check_0 = _u8868
72 local _val_0 = _u5143_u7d20
73 local _find_0 = false
74 for _index_0 = 1, #_check_0 do
75 local _item_0 = _check_0[_index_0]
76 if _item_0 == _val_0 then
77 _find_0 = true
78 break
79 end
80 end
81 _u5b58_u5728 = _find_0
82 end
83 _u68c0_u67e5((function()
84 local _check_0 = _u8868
85 local _val_0 = _u5143_u7d20
86 for _index_0 = 1, #_check_0 do
87 if _check_0[_index_0] == _val_0 then
88 return true
89 end
90 end
91 return false
92 end)())
93end
94do
95 local _u5bf9_u8c61 = _u83b7_u53d6()
96 local _u5217_u8868 = {
97 1,
98 2,
99 3
100 }
101 local _u4e0d_u5b58_u5728
102 do
103 local _val_0 = _u5143_u7d20
104 local _find_0 = false
105 for _index_0 = 1, #_u5217_u8868 do
106 local _item_0 = _u5217_u8868[_index_0]
107 if _item_0 == _val_0 then
108 _find_0 = true
109 break
110 end
111 end
112 _u4e0d_u5b58_u5728 = not _find_0
113 end
114 _u68c0_u67e5((function()
115 local _val_0 = _u5143_u7d20
116 for _index_0 = 1, #_u5217_u8868 do
117 if _u5217_u8868[_index_0] == _val_0 then
118 return true
119 end
120 end
121 return false
122 end)())
123 _u68c0_u67e5((function()
124 local _val_0 = _u5143_u7d20
125 return 1 == _val_0 or 2 == _val_0 or 3 == _val_0
126 end)())
127 _u68c0_u67e5((function(...)
128 local _check_0 = {
129 [1] = 1,
130 [2] = 2,
131 [3] = 3
132 }
133 local _val_0 = _u5143_u7d20(...)
134 for _index_0 = 1, #_check_0 do
135 if _check_0[_index_0] == _val_0 then
136 return true
137 end
138 end
139 return false
140 end)(...))
141end
142do
143 _u68c0_u67e5(function()
144 local _check_0 = _u6570_u7ec4tb
145 local _val_0 = _u5bf9_u8c61x
146 for _index_0 = 1, #_check_0 do
147 if _check_0[_index_0] == _val_0 then
148 return true
149 end
150 end
151 return false
152 end)
153 _u68c0_u67e5(function()
154 local _check_0 = _u6570_u7ec4tb
155 local _val_0 = _u5bf9_u8c61x
156 for _index_0 = 1, #_check_0 do
157 if _check_0[_index_0] == _val_0 then
158 return false
159 end
160 end
161 return true
162 end)
163 local _u5bf9_u8c61x, _u6570_u7ec4tb
164 _u68c0_u67e5(function()
165 for _index_0 = 1, #_u6570_u7ec4tb do
166 if _u6570_u7ec4tb[_index_0] == _u5bf9_u8c61x then
167 return true
168 end
169 end
170 return false
171 end)
172 _u68c0_u67e5(function()
173 for _index_0 = 1, #_u6570_u7ec4tb do
174 if _u6570_u7ec4tb[_index_0] == _u5bf9_u8c61x then
175 return false
176 end
177 end
178 return true
179 end)
180end
181return nil
diff --git a/spec/outputs/unicode/lists.lua b/spec/outputs/unicode/lists.lua
new file mode 100644
index 0000000..aafd516
--- /dev/null
+++ b/spec/outputs/unicode/lists.lua
@@ -0,0 +1,281 @@
1local _u4f60_u597d
2do
3 local _accum_0 = { }
4 local _len_0 = 1
5 for _, _u53d8_u91cfx in ipairs({
6 1,
7 2,
8 3,
9 4
10 }) do
11 _accum_0[_len_0] = _u53d8_u91cfx * 2
12 _len_0 = _len_0 + 1
13 end
14 _u4f60_u597d = _accum_0
15end
16local _u7269_u54c1 = {
17 1,
18 2,
19 3,
20 4,
21 5,
22 6
23}
24local _
25do
26 local _accum_0 = { }
27 local _len_0 = 1
28 for _u53d8_u91cfz in ipairs(_u7269_u54c1) do
29 if _u53d8_u91cfz > 4 then
30 _accum_0[_len_0] = _u53d8_u91cfz
31 _len_0 = _len_0 + 1
32 end
33 end
34 _ = _accum_0
35end
36local _u534a_u5f84
37do
38 local _accum_0 = { }
39 local _len_0 = 1
40 for _u53d8_u91cfa in ipairs({
41 1,
42 2,
43 3,
44 4,
45 5,
46 6
47 }) do
48 if _u597d_u6570_u5b57(_u53d8_u91cfa) then
49 _accum_0[_len_0] = {
50 _u53d8_u91cfa
51 }
52 _len_0 = _len_0 + 1
53 end
54 end
55 _u534a_u5f84 = _accum_0
56end
57do
58 local _accum_0 = { }
59 local _len_0 = 1
60 for _u53d8_u91cfz in _u7269_u54c1 do
61 for _u53d8_u91cfj in _u5217_u8868 do
62 if _u53d8_u91cfz > 4 then
63 _accum_0[_len_0] = _u53d8_u91cfz
64 _len_0 = _len_0 + 1
65 end
66 end
67 end
68 _ = _accum_0
69end
70require("实用")
71local _u503e_u5012
72_u503e_u5012 = function(_u53d8_u91cfx)
73 return _u6253_u5370(_u5b9e_u7528["倾倒"](_u53d8_u91cfx))
74end
75local _u8303_u56f4
76_u8303_u56f4 = function(_u6570_u91cf)
77 local _u53d8_u91cfi = 0
78 return coroutine.wrap(function()
79 while _u53d8_u91cfi < _u6570_u91cf do
80 coroutine.yield(_u53d8_u91cfi)
81 _u53d8_u91cfi = _u53d8_u91cfi + 1
82 end
83 end)
84end
85_u503e_u5012((function()
86 local _accum_0 = { }
87 local _len_0 = 1
88 for _u53d8_u91cfx in _u8303_u56f4(10) do
89 _accum_0[_len_0] = _u53d8_u91cfx
90 _len_0 = _len_0 + 1
91 end
92 return _accum_0
93end)())
94_u503e_u5012((function()
95 local _accum_0 = { }
96 local _len_0 = 1
97 for _u53d8_u91cfx in _u8303_u56f4(5) do
98 if _u53d8_u91cfx > 2 then
99 for _u53d8_u91cfy in _u8303_u56f4(5) do
100 _accum_0[_len_0] = {
101 _u53d8_u91cfx,
102 _u53d8_u91cfy
103 }
104 _len_0 = _len_0 + 1
105 end
106 end
107 end
108 return _accum_0
109end)())
110local _u4e1c_u897f
111do
112 local _accum_0 = { }
113 local _len_0 = 1
114 for _u53d8_u91cfx in _u8303_u56f4(10) do
115 if _u53d8_u91cfx > 5 then
116 for _u53d8_u91cfy in _u8303_u56f4(10) do
117 if _u53d8_u91cfy > 7 then
118 _accum_0[_len_0] = _u53d8_u91cfx + _u53d8_u91cfy
119 _len_0 = _len_0 + 1
120 end
121 end
122 end
123 end
124 _u4e1c_u897f = _accum_0
125end
126for _u53d8_u91cfx in ipairs({
127 1,
128 2,
129 4
130}) do
131 for _u53d8_u91cfy in ipairs({
132 1,
133 2,
134 3
135 }) do
136 if _u53d8_u91cfx ~= 2 then
137 _u6253_u5370(_u53d8_u91cfx, _u53d8_u91cfy)
138 end
139 end
140end
141for _u53d8_u91cfx in _u7269_u54c1 do
142 _u6253_u5370("你好", _u53d8_u91cfx)
143end
144do
145 local _accum_0 = { }
146 local _len_0 = 1
147 for _u53d8_u91cfx in _u53d8_u91cfx do
148 _accum_0[_len_0] = _u53d8_u91cfx
149 _len_0 = _len_0 + 1
150 end
151 _ = _accum_0
152end
153local _u53d8_u91cfx
154do
155 local _accum_0 = { }
156 local _len_0 = 1
157 for _u53d8_u91cfx in _u53d8_u91cfx do
158 _accum_0[_len_0] = _u53d8_u91cfx
159 _len_0 = _len_0 + 1
160 end
161 _u53d8_u91cfx = _accum_0
162end
163for _u53d8_u91cfx in ipairs({
164 1,
165 2,
166 4
167}) do
168 for _u53d8_u91cfy in ipairs({
169 1,
170 2,
171 3
172 }) do
173 if _u53d8_u91cfx ~= 2 then
174 _u6253_u5370(_u53d8_u91cfx, _u53d8_u91cfy)
175 end
176 end
177end
178local _u53cc_u500d
179do
180 local _accum_0 = { }
181 local _len_0 = 1
182 for _index_0 = 1, #_u7269_u54c1 do
183 local _u53d8_u91cfx = _u7269_u54c1[_index_0]
184 _accum_0[_len_0] = _u53d8_u91cfx * 2
185 _len_0 = _len_0 + 1
186 end
187 _u53cc_u500d = _accum_0
188end
189for _index_0 = 1, #_u53cc_u500d do
190 local _u53d8_u91cfx = _u53cc_u500d[_index_0]
191 _u6253_u5370(_u53d8_u91cfx)
192end
193local _u5207
194do
195 local _accum_0 = { }
196 local _len_0 = 1
197 for _index_0 = 1, #_u7269_u54c1 do
198 local _u53d8_u91cfx = _u7269_u54c1[_index_0]
199 if _u53d8_u91cfx > 3 then
200 _accum_0[_len_0] = _u53d8_u91cfx
201 _len_0 = _len_0 + 1
202 end
203 end
204 _u5207 = _accum_0
205end
206do
207 local _accum_0 = { }
208 local _len_0 = 1
209 for _index_0 = 1, #_u7269_u54c1 do
210 local _u53d8_u91cfx = _u7269_u54c1[_index_0]
211 for _index_1 = 1, #_u7269_u54c1 do
212 local _u53d8_u91cfy = _u7269_u54c1[_index_1]
213 _accum_0[_len_0] = _u53d8_u91cfx + _u53d8_u91cfy
214 _len_0 = _len_0 + 1
215 end
216 end
217 _u4f60_u597d = _accum_0
218end
219for _index_0 = 1, #_u4f60_u597d do
220 local _u53d8_u91cfz = _u4f60_u597d[_index_0]
221 _u6253_u5370(_u53d8_u91cfz)
222end
223_u53d8_u91cfx = {
224 1,
225 2,
226 3,
227 4,
228 5,
229 6,
230 7
231}
232local _max_0 = -5
233for _index_0 = 2, _max_0 < 0 and #_u53d8_u91cfx + _max_0 or _max_0, 2 do
234 local _u53d8_u91cfy = _u53d8_u91cfx[_index_0]
235 _u6253_u5370(_u53d8_u91cfy)
236end
237local _max_1 = 3
238for _index_0 = 1, _max_1 < 0 and #_u53d8_u91cfx + _max_1 or _max_1 do
239 local _u53d8_u91cfy = _u53d8_u91cfx[_index_0]
240 _u6253_u5370(_u53d8_u91cfy)
241end
242for _index_0 = 2, #_u53d8_u91cfx do
243 local _u53d8_u91cfy = _u53d8_u91cfx[_index_0]
244 _u6253_u5370(_u53d8_u91cfy)
245end
246for _index_0 = 1, #_u53d8_u91cfx, 2 do
247 local _u53d8_u91cfy = _u53d8_u91cfx[_index_0]
248 _u6253_u5370(_u53d8_u91cfy)
249end
250for _index_0 = 2, #_u53d8_u91cfx, 2 do
251 local _u53d8_u91cfy = _u53d8_u91cfx[_index_0]
252 _u6253_u5370(_u53d8_u91cfy)
253end
254local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = 1, 5, 2
255local _max_2 = _u53d8_u91cfb
256for _index_0 = _u53d8_u91cfa, _max_2 < 0 and #_u53d8_u91cfx + _max_2 or _max_2, _u53d8_u91cfc do
257 local _u53d8_u91cfy = _u53d8_u91cfx[_index_0]
258 _u6253_u5370(_u53d8_u91cfy)
259end
260local _u6b63_u5e38
261_u6b63_u5e38 = function(_u4f60_u597d)
262 local _accum_0 = { }
263 local _len_0 = 1
264 for _u53d8_u91cfx in _u55ef_u54fc do
265 _accum_0[_len_0] = _u53d8_u91cfx
266 _len_0 = _len_0 + 1
267 end
268 return _accum_0
269end
270local _u6d4b_u8bd5 = _u53d8_u91cfx(1, 2, 3, 4, 5)
271for _index_0 = 1, #_u6d4b_u8bd5 do
272 local _u4e8b_u60c5 = _u6d4b_u8bd5[_index_0]
273 _u6253_u5370(_u4e8b_u60c5)
274end
275return function()
276 local _list_0 = _u884c_u4eec
277 for _index_0 = 1, #_list_0 do
278 local _u884c = _list_0[_index_0]
279 _u53d8_u91cfa = _u53d8_u91cfb
280 end
281end
diff --git a/spec/outputs/unicode/literals.lua b/spec/outputs/unicode/literals.lua
new file mode 100644
index 0000000..ccd32f1
--- /dev/null
+++ b/spec/outputs/unicode/literals.lua
@@ -0,0 +1,36 @@
1local _u6570_u636e = {
2 121,
3 121.2323,
4 121.2323e-1,
5 121.2323e13434,
6 2323E34,
7 0x12323,
8 0xfF2323,
9 0xabcdef,
10 0xABCDEF,
11 0x123p-123,
12 0xABCP+321,
13 0x.1p-111,
14 0xABCP-321,
15 .2323,
16 .2323e-1,
17 .2323e13434,
18 1LL,
19 1ULL,
20 9332LL,
21 9332,
22 0x2aLL,
23 0x2aULL,
24 1000000.0000001,
25 1234e5678,
26 1234E-5678,
27 0xDEADBEEF,
28 [[ 你好 世界 ]],
29 [=[ 你好 世界 ]=],
30 [====[ 你好 世界 ]====],
31 "另一个 世界",
32 '哪个 世界',
33 "\n 你好 世界\n ",
34 '是的\n 发生了什么\n 这里有些很酷的东西'
35}
36return _u7a7a_u503c
diff --git a/spec/outputs/unicode/local.lua b/spec/outputs/unicode/local.lua
new file mode 100644
index 0000000..170144b
--- /dev/null
+++ b/spec/outputs/unicode/local.lua
@@ -0,0 +1,157 @@
1do
2 local _u53d8_u91cfa
3 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc
4 local _u53d8_u91cfg
5 _u53d8_u91cfb, _u53d8_u91cfg = 23232, nil
6end
7do
8 local _u53d8_u91cfx = 1212
9 local _u67d0_u4e8b
10 _u67d0_u4e8b = function()
11 local _u53d8_u91cfx
12 _u53d8_u91cfx = 1212
13 end
14end
15do
16 local _u53d8_u91cfy, _u53d8_u91cfz
17 _u53d8_u91cfy = 2323
18 _u53d8_u91cfz = 2323
19end
20do
21 _u6253_u5370("啥也没有!")
22end
23do
24 local X_u5927_u5199, Y_u5927_u5199
25 local x_u53d8_u91cf = 3434
26 local y_u53d8_u91cf = 3434
27 X_u5927_u5199 = 3434
28 Y_u5927_u5199 = "好"
29end
30do
31 local x_u53d8_u91cf, y_u53d8_u91cf = "a", "b"
32end
33do
34 local x_u53d8_u91cf, y_u53d8_u91cf
35 x_u53d8_u91cf, y_u53d8_u91cf = "a", "b"
36end
37do
38 if _u67d0_u4e8b then
39 local x_u53d8_u91cf = 2323
40 end
41end
42do
43 local _u53d8_u91cfx
44 do
45 _u53d8_u91cfx = "一"
46 end
47 _u53d8_u91cfx = 100
48 do
49 _u53d8_u91cfx = "二"
50 end
51end
52do
53 local _u53d8_u91cfk, _u53d8_u91cfx, _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc
54 if _u4ec0_u4e48 then
55 _u53d8_u91cfk = 10
56 end
57 _u53d8_u91cfx = 100
58 do
59 local _obj_0 = _u53d8_u91cfy
60 _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = _obj_0[1], _obj_0[2], _obj_0[3]
61 end
62end
63do
64 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd
65 _u53d8_u91cfa = 100
66 _u6253_u5370("嗨")
67 _u53d8_u91cfb = 200
68 _u53d8_u91cfc = 100
69 _u6253_u5370("嗨")
70 _u53d8_u91cfd = 200
71 _u53d8_u91cfd = 2323
72end
73do
74 local A_u5927_u5199, O_u4e00, T_u4e8c
75 local a_u5c0f_u5199 = 5
76 A_u5927_u5199 = 3
77 do
78 local _class_0
79 local F_u4e94
80 local _base_0 = { }
81 if _base_0.__index == nil then
82 _base_0.__index = _base_0
83 end
84 _class_0 = setmetatable({
85 __init = function() end,
86 __base = _base_0,
87 __name = "O一"
88 }, {
89 __index = _base_0,
90 __call = function(cls, ...)
91 local _self_0 = setmetatable({ }, _base_0)
92 cls.__init(_self_0, ...)
93 return _self_0
94 end
95 })
96 _base_0.__class = _class_0
97 local self = _class_0;
98 F_u4e94 = 6
99 O_u4e00 = _class_0
100 end
101 do
102 local _class_0
103 local N_u65e0
104 local _base_0 = { }
105 if _base_0.__index == nil then
106 _base_0.__index = _base_0
107 end
108 _class_0 = setmetatable({
109 __init = function() end,
110 __base = _base_0,
111 __name = "T二"
112 }, {
113 __index = _base_0,
114 __call = function(cls, ...)
115 local _self_0 = setmetatable({ }, _base_0)
116 cls.__init(_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
143 T_u4e8c = _class_0
144 end
145end
146do
147 local _list_0 = { }
148 for _index_0 = 1, #_list_0 do
149 local _u53d8_u91cfa = _list_0[_index_0]
150 local _ = _u53d8_u91cfa
151 end
152end
153do
154 local _u53d8_u91cfx
155 _u53d8_u91cfx = _u53d8_u91cfa or _u53d8_u91cfb
156end
157local _u53d8_u91cfg = 2323
diff --git a/spec/outputs/unicode/loops.lua b/spec/outputs/unicode/loops.lua
new file mode 100644
index 0000000..d630343
--- /dev/null
+++ b/spec/outputs/unicode/loops.lua
@@ -0,0 +1,337 @@
1for _u53d8_u91cfx = 1, 10 do
2 _u6253_u5370("yeah")
3end
4for _u53d8_u91cfx = 1, #_u67d0_u7269 do
5 _u6253_u5370("yeah")
6end
7for _u53d8_u91cfy = 100, 60, -3 do
8 _u6253_u5370("倒计时", _u53d8_u91cfy)
9end
10for _u53d8_u91cfa = 1, 10 do
11 _u6253_u5370("好的")
12end
13for _u53d8_u91cfa = 1, 10 do
14 for _u53d8_u91cfb = 2, 43 do
15 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb)
16 end
17end
18for _u53d8_u91cfi in _u8fed_u4ee3_u5668 do
19 for _u53d8_u91cfj in _u662f_u7684 do
20 local _u53d8_u91cfx = 343 + _u53d8_u91cfi + _u53d8_u91cfj
21 _u6253_u5370(_u53d8_u91cfi, _u53d8_u91cfj)
22 end
23end
24local _list_0 = _u67d0_u7269
25for _index_0 = 1, #_list_0 do
26 local _u53d8_u91cfx = _list_0[_index_0]
27 _u6253_u5370(_u53d8_u91cfx)
28end
29for _u952e, _u503c in pairs(_u4f60_u597d) do
30 _u6253_u5370(_u952e, _u503c)
31end
32for _u53d8_u91cfx in _u53d8_u91cfy, _u53d8_u91cfz do
33 _u6253_u5370(_u53d8_u91cfx)
34end
35for _u53d8_u91cfx in _u53d8_u91cfy, _u53d8_u91cfz, _u952e do
36 _u6253_u5370(_u53d8_u91cfx)
37end
38local _list_1 = _u6a21_u5757
39for _index_0 = 1, #_list_1 do
40 local _u540d_u79f0, _u6210_u5458_u4eec = _list_1[_index_0]
41 _u6253_u5370(_u540d_u79f0, _u6210_u5458)
42end
43local _u53d8_u91cfx
44_u53d8_u91cfx = function()
45 for _u53d8_u91cfx in _u53d8_u91cfy do
46 local _u53d8_u91cf_ = _u53d8_u91cfy
47 end
48end
49local _u4f60_u597d = {
50 1,
51 2,
52 3,
53 4,
54 5
55}
56do
57 local _accum_0 = { }
58 local _len_0 = 1
59 for _index_0 = 1, #_u4f60_u597d do
60 local _u53d8_u91cfy = _u4f60_u597d[_index_0]
61 if _u53d8_u91cfy % 2 == 0 then
62 _accum_0[_len_0] = _u53d8_u91cfy
63 end
64 _len_0 = _len_0 + 1
65 end
66 _u53d8_u91cfx = _accum_0
67end
68_u53d8_u91cfx = function()
69 for _index_0 = 1, #_u4f60_u597d do
70 local _u53d8_u91cfx = _u4f60_u597d[_index_0]
71 local _u53d8_u91cf_ = _u53d8_u91cfy
72 end
73end
74local _u8868_u683c
75do
76 local _accum_0 = { }
77 local _len_0 = 1
78 for _u53d8_u91cfi = 10, 20 do
79 _accum_0[_len_0] = _u53d8_u91cfi * 2
80 _len_0 = _len_0 + 1
81 end
82 _u8868_u683c = _accum_0
83end
84local _u54e6 = 0
85local _u53d8_u91cfy
86do
87 local _accum_0 = { }
88 local _len_0 = 1
89 for _u53d8_u91cfj = 3, 30, 8 do
90 _u54e6 = _u54e6 + 1
91 _accum_0[_len_0] = _u53d8_u91cfj * _u54e6
92 _len_0 = _len_0 + 1
93 end
94 _u53d8_u91cfy = _accum_0
95end
96local _u53d8_u91cf_
97_u53d8_u91cf_ = function()
98 for _u53d8_u91cfk = 10, 40 do
99 _u53d8_u91cf_ = "好的"
100 end
101end
102_u53d8_u91cf_ = function()
103 local _accum_0 = { }
104 local _len_0 = 1
105 for _u53d8_u91cfk = 10, 40 do
106 _accum_0[_len_0] = "好的"
107 _len_0 = _len_0 + 1
108 end
109 return _accum_0
110end
111while true do
112 _u6253_u5370("名称")
113end
114while 5 + 5 do
115 _u6253_u5370("好的 世界")
116 _u5de5_u4f5c(_u4eba)
117end
118while _u8fd8_u6709 do
119 _u6211(_u4e5f(_u5de5_u4f5c))
120 _u53d8_u91cf_ = "好的"
121end
122local _u53d8_u91cfi = 0
123do
124 local _accum_0 = { }
125 local _len_0 = 1
126 while _u53d8_u91cfi < 10 do
127 _u53d8_u91cfi = _u53d8_u91cfi + 1
128 _accum_0[_len_0] = _u53d8_u91cfi
129 _len_0 = _len_0 + 1
130 end
131 _u53d8_u91cfx = _accum_0
132end
133do
134 local _accum_0 = { }
135 local _len_0 = 1
136 local _list_2 = 3
137 for _index_0 = 1, #_list_2 do
138 local _u4e1c_u897f = _list_2[_index_0]
139 _u53d8_u91cfy = "你好"
140 break
141 _len_0 = _len_0 + 1
142 end
143 _u53d8_u91cfx = _accum_0
144end
145do
146 local _accum_0 = { }
147 local _len_0 = 1
148 for _u53d8_u91cfx = 1, 2 do
149 _u53d8_u91cfy = "你好"
150 _accum_0[_len_0] = _u53d8_u91cfy
151 _len_0 = _len_0 + 1
152 end
153 _u53d8_u91cfx = _accum_0
154end
155while true do
156 if false then
157 goto _continue_0
158 end
159 _u6253_u5370("是的")
160 if true then
161 break
162 end
163 _u6253_u5370("不")
164 ::_continue_0::
165end
166for _u53d8_u91cfi = 1, 10 do
167 while true do
168 if not true then
169 goto _continue_1
170 end
171 break
172 ::_continue_1::
173 end
174end
175local _u53d8_u91cfa = 1
176repeat
177 _u53d8_u91cfa = _u53d8_u91cfa + 1
178 if _u53d8_u91cfa == 5 then
179 goto _continue_2
180 end
181 if _u53d8_u91cfa == 6 then
182 break
183 end
184 _u6253_u5370(_u53d8_u91cfa)
185 ::_continue_2::
186until _u53d8_u91cfa == 10
187_u53d8_u91cfx = 0
188repeat
189 _u53d8_u91cfx = _u53d8_u91cfx + 1
190 _u53d8_u91cfy = _u53d8_u91cfx
191 if _u53d8_u91cfx < 5 then
192 goto _continue_3
193 end
194 _u6253_u5370(_u53d8_u91cfy)
195 ::_continue_3::
196until _u53d8_u91cfy == 10
197_u53d8_u91cfa = 3
198while not (_u53d8_u91cfa == 0) do
199 _u53d8_u91cfa = _u53d8_u91cfa - 1
200end
201local _u5b8c_u6210 = false
202while not _u5b8c_u6210 do
203 _u5b8c_u6210 = true
204end
205repeat
206 _u6253_u5370("你好")
207until true
208while not _u5b8c_u6210 do
209 _u53d8_u91cfx = 10
210 repeat
211 _u53d8_u91cfx = _u53d8_u91cfx - 1
212 until _u53d8_u91cfx == 0
213end
214while not _u6761_u4ef6 do
215 _u6253_u5370("好的")
216end
217for _u53d8_u91cfx = 1, 10 do
218 if _u53d8_u91cfx > 3 and _u53d8_u91cfx < 7 then
219 goto _continue_4
220 end
221 _u6253_u5370(_u53d8_u91cfx)
222 ::_continue_4::
223end
224local _u5217_u8868
225do
226 local _accum_0 = { }
227 local _len_0 = 1
228 for _u53d8_u91cfx = 1, 10 do
229 if _u53d8_u91cfx > 3 and _u53d8_u91cfx < 7 then
230 goto _continue_5
231 end
232 _accum_0[_len_0] = _u53d8_u91cfx
233 _len_0 = _len_0 + 1
234 ::_continue_5::
235 end
236 _u5217_u8868 = _accum_0
237end
238local _list_2 = {
239 1,
240 2,
241 3,
242 4,
243 5,
244 6
245}
246for _index_0 = 1, #_list_2 do
247 local _u53d8_u91cfa = _list_2[_index_0]
248 if _u53d8_u91cfa == 1 then
249 goto _continue_6
250 end
251 if _u53d8_u91cfa == 3 then
252 goto _continue_6
253 end
254 _u6253_u5370(_u53d8_u91cfa)
255 ::_continue_6::
256end
257for _u53d8_u91cfx = 1, 10 do
258 if _u53d8_u91cfx % 2 == 0 then
259 goto _continue_7
260 end
261 for _u53d8_u91cfy = 2, 12 do
262 if _u53d8_u91cfy % 3 == 0 then
263 goto _continue_8
264 end
265 ::_continue_8::
266 end
267 ::_continue_7::
268end
269while true do
270 if false then
271 goto _continue_9
272 end
273 break
274 ::_continue_9::
275end
276while true do
277 if false then
278 goto _continue_10
279 end
280 do
281 return 22
282 end
283 ::_continue_10::
284end
285do
286 local _u4e09_u91cdx = {
287 1,
288 2,
289 3,
290 4
291 }
292 for _index_0 = 1, #_u4e09_u91cdx do
293 local _u4e1c_u897f = _u4e09_u91cdx[_index_0]
294 _u6253_u5370(_u4e1c_u897f)
295 end
296end
297do
298 for _u53d8_u91cfi = 1, 10 do
299 repeat
300 do
301 local _with_0 = _u5bf9_u8c61tb
302 if _with_0 ~= nil then
303 _with_0["字段a"] = 1
304 if _with_0["字段b"] then
305 goto _continue_12
306 end
307 do
308 if _with_0["字段c"] then
309 break
310 end
311 end
312 end
313 end
314 ::_continue_12::
315 until true
316 if 123 == _u53d8_u91cfx then
317 break
318 else
319 goto _continue_11
320 end
321 if _u53d8_u91cfy then
322 goto _continue_11
323 else
324 break
325 end
326 do
327 do
328 do
329 _u6253_u5370(_u53d8_u91cfi)
330 goto _continue_11
331 end
332 end
333 end
334 _u6253_u5370("abc")
335 ::_continue_11::
336 end
337end
diff --git a/spec/outputs/unicode/macro.lua b/spec/outputs/unicode/macro.lua
new file mode 100644
index 0000000..2ae5dce
--- /dev/null
+++ b/spec/outputs/unicode/macro.lua
@@ -0,0 +1,321 @@
1assert(_u5bf9_u8c61 == nil)
2local _u7ed3_u679c = (_u5bf9_u8c61 == nil)
3if _u51fd_u65701() then
4 _u6253_u5370("没问题")
5end
6if (_u51fd_u65701() and _u51fd_u65702() and _u51fd_u65703()) then
7 _u6253_u5370("没问题")
8end
9local _u5bf9_u8c61
10do
11 local __u6e90_, __u76ee_u6807_
12 do
13 __u76ee_u6807_ = {
14 ["位置"] = { },
15 ["标签"] = (function()
16 local _call_0 = _u6807_u7b7e
17 return _call_0["转数字"](_call_0)
18 end)()
19 }
20 do
21 __u6e90_ = self
22 __u76ee_u6807_["标识"] = __u6e90_["标识"]
23 __u76ee_u6807_["连接们"] = __u6e90_["连接们"]
24 __u76ee_u6807_["位置"]["x坐标"] = __u6e90_["位置"]["x坐标"]
25 __u76ee_u6807_["位置"]["y坐标"] = __u6e90_["位置"]["y坐标"]
26 __u76ee_u6807_["位置"]["z坐标"] = __u6e90_["位置"]["z坐标"]
27 end
28 _u5bf9_u8c61 = __u76ee_u6807_
29 end
30end
31if (_u53d8_u91cfx == "🍎" or _u53d8_u91cfx == "🐷" or _u53d8_u91cfx == "🐶") then
32 _u6253_u5370("存在")
33end
34local _list_0 = (function()
35 local _accum_0 = { }
36 local _len_0 = 1
37 local _list_0 = (function()
38 local _accum_1 = { }
39 local _len_1 = 1
40 local _list_0 = {
41 1,
42 2,
43 3
44 }
45 for _index_0 = 1, #_list_0 do
46 local _ = _list_0[_index_0]
47 _accum_1[_len_1] = _ * 2
48 _len_1 = _len_1 + 1
49 end
50 return _accum_1
51 end)()
52 for _index_0 = 1, #_list_0 do
53 local _ = _list_0[_index_0]
54 if _ > 4 then
55 _accum_0[_len_0] = _
56 _len_0 = _len_0 + 1
57 end
58 end
59 return _accum_0
60end)()
61for _index_0 = 1, #_list_0 do
62 local _ = _list_0[_index_0]
63 _u6253_u5370(_)
64end
65local _list_1 = (function()
66 local _accum_0 = { }
67 local _len_0 = 1
68 local _list_1 = (function()
69 local _accum_1 = { }
70 local _len_1 = 1
71 local _list_1 = {
72 1,
73 2,
74 3
75 }
76 for _index_0 = 1, #_list_1 do
77 local _ = _list_1[_index_0]
78 _accum_1[_len_1] = _ * 2
79 _len_1 = _len_1 + 1
80 end
81 return _accum_1
82 end)()
83 for _index_0 = 1, #_list_1 do
84 local _ = _list_1[_index_0]
85 if _ > 4 then
86 _accum_0[_len_0] = _
87 _len_0 = _len_0 + 1
88 end
89 end
90 return _accum_0
91end)()
92for _index_0 = 1, #_list_1 do
93 local _ = _list_1[_index_0]
94 _u6253_u5370(_)
95end
96local _u503c
97do
98 local _2
99 do
100 local _accum_0 = { }
101 local _len_0 = 1
102 local _list_2 = {
103 1,
104 2,
105 3
106 }
107 for _index_0 = 1, #_list_2 do
108 local _ = _list_2[_index_0]
109 _accum_0[_len_0] = _ * 2
110 _len_0 = _len_0 + 1
111 end
112 _2 = _accum_0
113 end
114 local _3
115 do
116 local _accum_0 = { }
117 local _len_0 = 1
118 for _index_0 = 1, #_2 do
119 local _ = _2[_index_0]
120 if _ > 4 then
121 _accum_0[_len_0] = _
122 _len_0 = _len_0 + 1
123 end
124 end
125 _3 = _accum_0
126 end
127 local _4
128 if #_3 == 0 then
129 _4 = 0
130 else
131 local _1 = 0
132 for _index_0 = 1, #_3 do
133 local _2 = _3[_index_0]
134 _1 = _1 + _2
135 end
136 _4 = _1
137 end
138 _u503c = _4
139end
140local _call_0 = (1 + 2)
141_call_0["调用"](_call_0, 123)
142_u7ed3_u679c = (1 + 2)
143local f
144f = function(_u53c2_u6570x)
145 return function(_u53c2_u6570y)
146 return function(_u53c2_u6570z)
147 return _u6253_u5370(_u53c2_u6570x, _u53c2_u6570y, _u53c2_u6570z)
148 end
149 end
150end
151do
152 local _u53d8_u91cfa = 8
153 do
154 _u53d8_u91cfa = 1
155 _u53d8_u91cfa = _u53d8_u91cfa + 1
156 end
157 _u53d8_u91cfa = _u53d8_u91cfa + (function()
158 _u53d8_u91cfa = 1
159 return _u53d8_u91cfa + 1
160 end)()
161 _u6253_u5370(_u53d8_u91cfa)
162end
163do
164 local _u53d8_u91cfa = 8
165 _u53d8_u91cfa = (function()
166 local _u53d8_u91cfa
167 _u53d8_u91cfa = 1
168 return _u53d8_u91cfa + 1
169 end)()
170 _u53d8_u91cfa = _u53d8_u91cfa + (function()
171 local _u53d8_u91cfa
172 _u53d8_u91cfa = 1
173 return _u53d8_u91cfa + 1
174 end)()
175 _u6253_u5370(_u53d8_u91cfa)
176end
177local _u53d8_u91cfx = 0
178local function f(a)
179 return a + 1
180end
181x = x + f(3)
182function tb:func()
183 print(123)
184end
185_u6253_u5370(_u53d8_u91cfx)
186local sel
187sel = function(_u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c)
188 if _u53c2_u6570a then
189 return _u53c2_u6570b
190 else
191 return _u53c2_u6570c
192 end
193end
194local function sel(a, b, c)
195 if a then
196 return b
197 else
198 return c
199 end
200end
201local function dummy()
202
203end
204-- 这有个注释
205local _ = require('下划线')
206local _call_1 = (_({
207 1,
208 2,
209 3,
210 4,
211 -2,
212 3
213}))
214_call_1 = _call_1["链"](_call_1, _call_1, _call_1, _call_1, _call_1, _call_1, _call_1, _call_1)
215_call_1 = _call_1["映射"](_call_1, _call_1, _call_1, _call_1, function(self)
216 return self * 2
217end)
218_call_1 = _call_1["过滤"](_call_1, _call_1, function(self)
219 return self > 3
220end)
221local _u7ed3_u679ca = _call_1["取值"](_call_1)
222local _call_2 = (_({
223 1,
224 2,
225 3,
226 4,
227 -2,
228 3
229}))
230_call_2 = _call_2["链"](_call_2, _call_2, _call_2, _call_2, _call_2, _call_2, _call_2, _call_2)
231_call_2 = _call_2["映射"](_call_2, _call_2, _call_2, _call_2, function(self)
232 return self * 2
233end)
234_call_2 = _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, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3)
242_call_3 = _call_3["后代"](_call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3)
243_call_3 = _call_3["选择启用"](_call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3)
244_call_3 = _call_3["选择可见"](_call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3, _call_3)
245_call_3 = _call_3["标签等于"](_call_3, _call_3, _call_3, _call_3, "fx")
246_call_3 = _call_3["其中"](_call_3, _call_3, function(x)
247 local _call_4 = x["名称"]
248 return _call_4["结尾为"](_call_4, _call_4, "(克隆)")
249end)
250_u7ed3_u679c = _call_3["摧毁"](_call_3)
251do
252 local _1
253 local _call_4 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
254 _1 = _call_4["父节点"](_call_4)
255 local _2
256 _2 = _1["后代"](_1)
257 local _3
258 _3 = _2["选择启用"](_2)
259 local _4
260 _4 = _3["选择可见"](_3)
261 local _5
262 _5 = _4["标签等于"](_4, "fx")
263 local _6
264 _6 = _5["其中"](_5, function(x)
265 local _call_5 = x["名称"]
266 return _call_5["结尾为"](_call_5, "(克隆)")
267 end)
268 _6["摧毁"](_6)
269end
270local _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)
272 local _call_0 = x["名称"]
273 return _call_0["结尾为"](_call_0, "(克隆)")
274end):_u6467_u6bc1()
275_u6253_u5370((setmetatable({
276 'abc',
277 ["字段a"] = 123,
278}, {
279 __call = function(self)
280 return 998
281 end
282}))[1], (setmetatable({
283 'abc',
284 ["字段a"] = 123,
285}, {
286 __call = function(self)
287 return 998
288 end
289}))["字段a"], (setmetatable({
290 'abc',
291 ["字段a"] = 123,
292}, {
293 __call = function(self)
294 return 998
295 end
296}))(), setmetatable({
297 'abc',
298 ["字段a"] = 123,
299}, {
300 __call = function(self)
301 return 998
302 end
303}))
304_u6253_u5370("当前代码行数: " .. tostring(268))
305-- 待实现
306do
307 _u6253_u5370(1)
308end
309local _1
310_1 = function()
311 _u6253_u5370(1)
312 local _accum_0 = { }
313 local _len_0 = 1
314 while false do
315 break
316 _len_0 = _len_0 + 1
317 end
318 return _accum_0
319end
320_u6253_u5370('abc')
321return 123
diff --git a/spec/outputs/unicode/metatable.lua b/spec/outputs/unicode/metatable.lua
new file mode 100644
index 0000000..b6ee48a
--- /dev/null
+++ b/spec/outputs/unicode/metatable.lua
@@ -0,0 +1,168 @@
1local _u53d8_u91cfa = setmetatable({
2 ["关闭"] = true,
3}, {
4 __close = function(self)
5 return _u6253_u5370("离开作用域")
6 end
7})
8local _u53d8_u91cfb = setmetatable({ }, {
9 __add = function(_u5de6, _u53f3)
10 return _u53f3 - _u5de6
11 end
12})
13local _u53d8_u91cfc = setmetatable({
14 ["键1"] = true,
15 ["键2"] = true
16}, {
17 __add = add
18})
19local _u53d8_u91cfw = setmetatable({ }, {
20 [_u540d_u79f0] = 123,
21 ["新建"] = function(self, _u503c)
22 return {
23 _u503c
24 }
25 end
26})
27getmetatable(_u53d8_u91cfw)["新建"](getmetatable(_u53d8_u91cfw)[_u540d_u79f0])
28do
29 local _ <close> = setmetatable({ }, {
30 __close = function()
31 return _u6253_u5370("离开作用域")
32 end
33 })
34end
35local _u53d8_u91cfd, _u53d8_u91cfe = _u53d8_u91cfa["关闭"], getmetatable(_u53d8_u91cfa).__close
36local _u53d8_u91cff = getmetatable(_u53d8_u91cfa):__close(1)
37getmetatable(_u53d8_u91cfa).__add = function(x, y)
38 return x + y
39end
40do
41 local _u65b0 = _u53d8_u91cfa["新"]
42 local close, _u5173_u95edA
43 do
44 local _obj_0 = getmetatable(_u53d8_u91cfa)
45 close, _u5173_u95edA = _obj_0.__close, _obj_0.__close
46 end
47 _u6253_u5370(_u65b0, close, _u5173_u95edA)
48end
49do
50 local _u53d8_u91cfx, _u65b0, _u53d8_u91cf, close, _u5173_u95edA, num, add, sub
51 do
52 local _obj_0, _obj_1
53 _u53d8_u91cfx, _obj_0, _obj_1 = 123, _u53d8_u91cfa["变量b"]["变量c"], _u51fd_u6570()
54 _u65b0, _u53d8_u91cf = _obj_0["新"], _obj_0["变量"]
55 do
56 local _obj_2 = getmetatable(_obj_0)
57 close, _u5173_u95edA = _obj_2.__close, _obj_2.__close
58 end
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
65end
66setmetatable(_u53d8_u91cfa["变量b"], { })
67_u53d8_u91cfx.abc = 123
68setmetatable(_u51fd_u6570(), mt)
69setmetatable(_u53d8_u91cfb["变量c"], mt)
70_u53d8_u91cfa, _u53d8_u91cfd, _u53d8_u91cfe = 1, "abc", nil
71local _u76f8_u540c = getmetatable(_u53d8_u91cfa).__index == getmetatable(_u53d8_u91cfa).__index
72setmetatable(_u53d8_u91cfa, {
73 __index = _u8868
74})
75getmetatable(_u53d8_u91cfa).__index = _u8868
76getmetatable(_u53d8_u91cfa).__index = _u8868
77local mt = getmetatable(_u53d8_u91cfa)
78local _call_0 = _u8868
79_call_0["函数"](_call_0, #_u5217_u8868)
80do
81 local _obj_0 = getmetatable(_u8868)
82 _obj_0["函数"](_obj_0, _u5217_u8868)
83end
84do
85 local _obj_0 = getmetatable(_u8868)
86 _obj_0["函数"](_obj_0, _u5217_u8868)
87end
88local index, _u8bbe_u7f6e_u51fd_u6570
89do
90 local _obj_0 = getmetatable(require("模块"))
91 index, _u8bbe_u7f6e_u51fd_u6570 = _obj_0.__index, _obj_0.__newindex
92end
93do
94 local _with_0 = _u8868
95 _u6253_u5370(getmetatable(_with_0).__add, getmetatable(_with_0.x):__index("key"))
96 do
97 local _obj_0 = getmetatable(getmetatable(getmetatable(_with_0).__index).__add)
98 _u53d8_u91cfa = _obj_0["新建"](_obj_0, 123)
99 end
100 _u53d8_u91cfb = t(#getmetatable(_with_0).__close["测试"])
101 _u53d8_u91cfc = t(#getmetatable(_with_0).__close(_with_0["测试"]))
102end
103mt = getmetatable(_u53d8_u91cfa)
104_u53d8_u91cfa = setmetatable({ }, mt)
105_u53d8_u91cfa = setmetatable({ }, {
106 __index = mt
107})
108local index
109local _u7d22_u5f15 = getmetatable(_u53d8_u91cfa).__index
110index = getmetatable(_u53d8_u91cfa).__index
111do
112 local _u6784_u9020, _u66f4_u65b0
113 do
114 local _obj_0 = getmetatable(_u53d8_u91cfa)
115 _u6784_u9020, _u66f4_u65b0 = _obj_0["新"], _obj_0["更新"]
116 end
117end
118do
119 local _u6784_u9020, _u66f4_u65b0
120 do
121 local _obj_0 = getmetatable(_u53d8_u91cfa)
122 _u6784_u9020, _u66f4_u65b0 = _obj_0["新"], _obj_0["更新"]
123 end
124end
125local _u8868 = { }
126do
127 do
128 local _obj_0 = getmetatable(_u8868)
129 _u53d8_u91cff = _obj_0["值" .. tostring(x < y)](_obj_0, 123, ...)
130 end
131 _u53d8_u91cff((function(...)
132 local _obj_0 = getmetatable(_u8868)
133 return _obj_0['值'](_obj_0, 123, ...)
134 end)(...))
135 do
136 local _obj_0 = getmetatable(_u8868)
137 _obj_0[ [[ 值
138 1
139 ]]](_obj_0, 123, ...)
140 end
141 local _obj_0 = getmetatable(_u8868)
142 return _obj_0["值" .. tostring(x > y)](_obj_0, 123, ...)
143end
144do
145 do
146 local _obj_0 = getmetatable(_u8868)
147 _u53d8_u91cff = _obj_0['值'](_obj_0, 123, ...)
148 end
149 _u53d8_u91cff((function(...)
150 local _obj_0 = getmetatable(_u8868)
151 return _obj_0['值'](_obj_0, 123, ...)
152 end)(...))
153 do
154 local _obj_0 = getmetatable(_u8868)
155 _obj_0['值'](_obj_0, 123, ...)
156 end
157 local _obj_0 = getmetatable(_u8868)
158 return _obj_0['值'](_obj_0, 123, ...)
159end
160do
161 _u53d8_u91cff = getmetatable(_u8868)["值"](123, ...)
162 _u53d8_u91cff = getmetatable(_u8868)["值" .. tostring(x < y)](123, ...)
163 _u53d8_u91cff(getmetatable(_u8868)['值'](123, ...))
164 getmetatable(_u8868)[ [[ 值
1651]]](123, ...)
166 return getmetatable(_u8868)["值" .. tostring(x > y)](123, ...)
167end
168return nil
diff --git a/spec/outputs/unicode/multiline_chain.lua b/spec/outputs/unicode/multiline_chain.lua
new file mode 100644
index 0000000..90fdf0b
--- /dev/null
+++ b/spec/outputs/unicode/multiline_chain.lua
@@ -0,0 +1,135 @@
1local _u53d8_u91cfx = _u53d8_u91cfa["变量b"]["变量c"]["变量d"]
2local _call_0 = _u53d8_u91cfa["变量b"]
3_u53d8_u91cfx["变量y"] = _call_0["变量c"](_call_0)
4_u51fd_u6570(1, (function()
5 local _call_1 = _u53c2_u65702["值"]
6 return _call_1["获取"](_call_1)
7end)(), (function()
8 local _call_1 = _u53c2_u65703["值"]
9 return _call_1["获取"](_call_1)
10end)(), {
11 1,
12 ((function()
13 if _u53d8_u91cfx ~= nil then
14 local _obj_0 = _u53d8_u91cfx["变量y"]
15 if _obj_0 ~= nil then
16 return _obj_0["变量z"]
17 end
18 return nil
19 end
20 return nil
21 end)() ~= nil),
22 3
23})
24local _u8868bb = {
25 ["键1"] = (function()
26 local _call_1 = _u53d8_u91cfa
27 return _call_1["变量b"](_call_1, 123)["变量c"]()
28 end)(),
29 ["键2"] = {
30 ["键w1"] = (function()
31 local _call_1 = _u53d8_u91cfa()["变量b"]
32 return _call_1["变量c"](_call_1)
33 end)()
34 }
35}
36local _u8868b
37do
38 local _obj_0 = _u51fd_u65702
39 if _obj_0 ~= nil then
40 _u8868b = _obj_0("abc", _u51fd_u65701({ })["变量a"])
41 end
42end
43local _u51fd_u6570
44_u51fd_u6570 = function()
45 local _accum_0 = { }
46 local _len_0 = 1
47 local _list_0 = _u503c_u96c6_u5408
48 for _index_0 = 1, #_list_0 do
49 local _des_0 = _list_0[_index_0]
50 local _u53d8_u91cfa = _des_0[1]
51 local _call_1 = _u53d8_u91cfa["变量b"]
52 _accum_0[_len_0] = _call_1["变量c"](_call_1, 123)
53 _len_0 = _len_0 + 1
54 end
55 return _accum_0
56end
57local _u51fd_u65701
58_u51fd_u65701 = function()
59 return _u53d8_u91cfx, (function()
60 local _call_1 = _u53d8_u91cfa
61 return _call_1["变量b"](_call_1, 123)["变量c"]("abc")
62 end)()
63end
64local _call_1 = _u539f_u59cb["转换"].root.gameObject
65local _call_2 = _call_1["父节点"](_call_1)
66local _call_3 = _call_2["后代节点"](_call_2)
67local _call_4 = _call_3["选择启用"](_call_3)
68local _call_5 = _call_4["选择可见"](_call_4)
69local _call_6 = _call_5["标签相等"](_call_5, "fx")
70local _call_7 = _call_6["筛选"](_call_6, function(_u5143_u7d20)
71 if _u5143_u7d20["是否目标"](_u5143_u7d20, _u5143_u7d20) then
72 return false
73 end
74 local _call_7 = _u5143_u7d20["名称"]
75 return _call_7["结束于"](_call_7, _call_7, "(Clone)")
76end)
77local _u7ed3_u679c = _call_7["销毁"](_call_7)
78local _call_8 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
79local _call_9 = _call_8["父节点"](_call_8)
80local _call_10 = _call_9["后代节点"](_call_9)
81local _call_11 = _call_10["选择启用"](_call_10)
82local _call_12 = _call_11["选择可见"](_call_11)
83local _call_13 = _call_12["标签相等"](_call_12, "fx")
84local _call_14 = _call_13["筛选"](_call_13, function(_u5143_u7d20)
85 local _call_14 = _u5143_u7d20["名称"]
86 return _call_14["结束于"](_call_14, _call_14, "(Clone)")
87end)
88_call_14["销毁"](_call_14)
89do
90 local _with_0 = _u9879_u76ee
91 _with_0["项目字段A"] = 123
92 local _call_15 = _with_0["调用方法"](_with_0)
93 _call_15["连续调用"](_call_15)
94 local _call_16 = _with_0["调用方法"](_with_0)
95 _call_16["连续调用"](_call_16)
96 _with_0["连续调用"](_with_0)
97 do
98 local _call_17 = _with_0["项目字段B"]
99 local _exp_0 = _call_17["取值"](_call_17)
100 if "Valid" == _exp_0 or _with_0["获取项目状态"](_with_0) == _exp_0 then
101 local _call_18 = _with_0["项目方法A"](_with_0)
102 _call_18["取值"](_call_18)
103 else
104 local _call_18 = _with_0["项目方法B"](_with_0)
105 _call_18["取值"](_call_18)
106 end
107 end
108 local _u53d8_u91cfa
109 if _with_0["项目字段C"] then
110 _u53d8_u91cfa = _with_0["项目字段D"]
111 else
112 _u53d8_u91cfa = _with_0["项目字段E"]
113 end
114 local _list_0 = _u503c_u96c6_u5408
115 for _index_0 = 1, #_list_0 do
116 local _u53d8_u91cfv = _list_0[_index_0]
117 _with_0["项目方法C"](_with_0, _u53d8_u91cfv)
118 end
119 for _u53d8_u91cfi = 1, _u8ba1_u6570_u5668 do
120 _with_0["项目方法C"](_with_0, _u53d8_u91cfi)
121 end
122 if not _with_0["变量b"] then
123 do
124 local _accum_0 = { }
125 local _len_0 = 1
126 while _with_0["项目字段D"] do
127 local _call_17 = _with_0["下一个项目"](_with_0)
128 _accum_0[_len_0] = _call_17["取得"](_call_17)
129 _len_0 = _len_0 + 1
130 end
131 _with_0["变量c"] = _accum_0
132 end
133 end
134end
135return nil
diff --git a/spec/outputs/unicode/nil_coalescing.lua b/spec/outputs/unicode/nil_coalescing.lua
new file mode 100644
index 0000000..90fd097
--- /dev/null
+++ b/spec/outputs/unicode/nil_coalescing.lua
@@ -0,0 +1,182 @@
1do
2 local _u53d8_u91cfa
3 do
4 local _exp_0 = _u53d8_u91cfb
5 if _exp_0 ~= nil then
6 _u53d8_u91cfa = _exp_0
7 else
8 _u53d8_u91cfa = _u53d8_u91cfc
9 end
10 end
11end
12do
13 local _u5b57_u6bb5a
14 do
15 local _exp_0 = _u53d8_u91cfb
16 if _exp_0 ~= nil then
17 _u5b57_u6bb5a = _exp_0["字段a"]
18 else
19 _u5b57_u6bb5a = _u53d8_u91cfc["字段a"]
20 end
21 end
22end
23do
24 local _u53d8_u91cfa = _u51fd_u6570()
25 if _u53d8_u91cfa == nil then
26 _u53d8_u91cfa = false
27 end
28end
29do
30 local _u53d8_u91cfa
31 if _u53d8_u91cfa == nil then
32 _u53d8_u91cfa = _u51fd_u6570()
33 end
34end
35do
36 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe
37 if _u53d8_u91cfb ~= nil then
38 _u53d8_u91cfa = _u53d8_u91cfb
39 else
40 if _u53d8_u91cfc ~= nil then
41 _u53d8_u91cfa = _u53d8_u91cfc
42 else
43 if _u53d8_u91cfd ~= nil then
44 _u53d8_u91cfa = _u53d8_u91cfd
45 else
46 _u53d8_u91cfa = _u53d8_u91cfe
47 end
48 end
49 end
50end
51do
52 local _u53d8_u91cfa
53 do
54 local _exp_0 = _u53d8_u91cfb
55 if _exp_0 ~= nil then
56 _u53d8_u91cfa = _exp_0
57 else
58 do
59 local _exp_1 = _u53d8_u91cfc
60 if _exp_1 ~= nil then
61 _u53d8_u91cfa = _exp_1
62 else
63 do
64 local _exp_2 = _u53d8_u91cfd
65 if _exp_2 ~= nil then
66 _u53d8_u91cfa = _exp_2
67 else
68 _u53d8_u91cfa = _u53d8_u91cfe
69 end
70 end
71 end
72 end
73 end
74 end
75end
76do
77 _u51fd_u6570((function()
78 local _exp_0 = _u53d8_u91cfx
79 if _exp_0 ~= nil then
80 return _exp_0
81 else
82 return "你好"
83 end
84 end)())
85end
86do
87 do
88 local _with_0
89 do
90 local _exp_0 = _u51fd_u6570A()
91 if _exp_0 ~= nil then
92 _with_0 = _exp_0
93 else
94 _with_0 = _u51fd_u6570B()
95 end
96 end
97 _u6253_u5370(_with_0["字段"])
98 end
99end
100do
101 local _u53d8_u91cfa = 1 + 2 + (function()
102 local _exp_0 = _u53d8_u91cfb
103 if _exp_0 ~= nil then
104 return _exp_0
105 else
106 return _u53d8_u91cfc + 3 + 4
107 end
108 end)()
109end
110do
111 local _u53d8_u91cfa = 1 + 2 + ((function()
112 local _exp_0 = _u53d8_u91cfb
113 if _exp_0 ~= nil then
114 return _exp_0
115 else
116 return _u53d8_u91cfc
117 end
118 end)()) + 3 + 4
119end
120do
121 local _u5b57_u6bb5a, _u5b57_u6bb5b
122 do
123 local _obj_0 = _u51fd_u6570()
124 _u5b57_u6bb5a, _u5b57_u6bb5b = _obj_0["字段a"], _obj_0["字段b"]
125 end
126 local _u53d8_u91cfa = _u53d8_u91cfa or 1
127 local _u53d8_u91cfb
128 if _u53d8_u91cfb == nil then
129 do
130 local _exp_0 = _u53d8_u91cfc
131 if _exp_0 ~= nil then
132 _u53d8_u91cfb = _exp_0
133 else
134 _u53d8_u91cfb = 2
135 end
136 end
137 end
138end
139do
140 local _u53d8_u91cfa
141 do
142 local _exp_0 = 1
143 if _exp_0 ~= nil then
144 _u53d8_u91cfa = _exp_0
145 else
146 do
147 local _exp_1 = 2
148 if _exp_1 ~= nil then
149 _u53d8_u91cfa = _exp_1
150 else
151 _u53d8_u91cfa = 3
152 end
153 end
154 end
155 end
156end
157do
158 local _obj_0 = _u53d8_u91cfa["字段"]
159 if _obj_0["字段"] == nil then
160 _obj_0["字段"] = 1
161 end
162 local _u53d8_u91cfa
163 do
164 local _exp_0 = _u53d8_u91cfb["字段"]
165 if _exp_0 ~= nil then
166 _u53d8_u91cfa = _exp_0
167 else
168 do
169 local _exp_1 = _u53d8_u91cfc["字段"]
170 if _exp_1 ~= nil then
171 _u53d8_u91cfa = _exp_1
172 else
173 _u53d8_u91cfa = _u53d8_u91cfd["字段"]
174 end
175 end
176 end
177 end
178 if _u53d8_u91cfa["字段"] == nil then
179 _u53d8_u91cfa["字段"] = 1
180 end
181end
182return nil
diff --git a/spec/outputs/unicode/operators.lua b/spec/outputs/unicode/operators.lua
new file mode 100644
index 0000000..c515dd1
--- /dev/null
+++ b/spec/outputs/unicode/operators.lua
@@ -0,0 +1,29 @@
1local _u6570_u5b57x = 1 + 3
2local _u6570_u5b57y = 1 + 3
3local _u6570_u5b57z = 1 + 3 + 4
4local _u6570_u5b57k = _u53d8_u91cfb and _u53d8_u91cfc and _u53d8_u91cfg
5local _u53d8_u91cfh = _u4e1c_u897f and function()
6 return _u6253_u5370("你好 世界")
7end
8local _u53d8_u91cfi = _u4e1c_u897f or function()
9 return _u6253_u5370("你好 世界")
10end
11local _u53d8_u91cfp = _u4e1c_u897f and function() end
12_u6253_u5370("你好 世界")
13local _u53d8_u91cfs = _u4e1c_u897f or function() end and 234
14local _u53d8_u91cfu = {
15 ["颜色"] = 1 and 2 and 3,
16 4,
17 4
18}
19local _u53d8_u91cfv = {
20 ["颜色"] = 1 and function()
21 return "yeah"
22 end,
23 "great",
24 ["好的"] = 3 ^ 2
25}
26local _u53d8_u91cfnno = (_u662f_u7684 + 2)
27local _u53d8_u91cfnn = (_u662f_u7684 + 2)
28local _u53d8_u91cfn = _u4f60_u597d(_u53d8_u91cfb)(function() end)
29return _u4f60_u597d(_u53d8_u91cfa, (_u662f_u7684 + 2) - _u597d_u7684)
diff --git a/spec/outputs/unicode/pipe.lua b/spec/outputs/unicode/pipe.lua
new file mode 100644
index 0000000..6e262ae
--- /dev/null
+++ b/spec/outputs/unicode/pipe.lua
@@ -0,0 +1,135 @@
1_u6bcf_u4e00_u4e2a({
2 "abc",
3 123,
4 998
5}, _u6253_u5370)
6_u6253_u5370(_u5408_u5e76(_u8fc7_u6ee4(_u6620_u5c04({
7 1,
8 2,
9 3
10}, function(_u53d8_u91cfx)
11 return _u53d8_u91cfx * 2
12end), function(_u53d8_u91cfx)
13 return _u53d8_u91cfx > 4
14end), 0, function(_u53d8_u91cfa, _u53d8_u91cfb)
15 return _u53d8_u91cfa + _u53d8_u91cfb
16end))
17_u6253_u5370(table.concat((function()
18 local _accum_0 = { }
19 local _len_0 = 1
20 for i = 0, 10 do
21 _accum_0[_len_0] = tostring(i)
22 _len_0 = _len_0 + 1
23 end
24 return _accum_0
25end)(), ","))
26local _u53d8_u91cfb = 1 + 2 + (_u6253_u5370(tostring(4), 1) or 123)
27do
28 local _u53d8_u91cfx = math.max(233, 998)
29 if _u53d8_u91cfx then
30 _u6253_u5370(_u53d8_u91cfx)
31 end
32end
33do
34 local _with_0
35 do
36 local _obj_0 = _u521b_u5efa
37 if _obj_0 ~= nil then
38 _with_0 = _obj_0(_u53d8_u91cfb, "new")
39 end
40 end
41 _with_0.value = 123
42 _u6253_u5370(_with_0["工作"](_with_0))
43end
44do
45 local _obj_0 = _u51fd_u6570f
46 if _obj_0 ~= nil then
47 _obj_0(123)
48 end
49end
50do
51 local _obj_0 = _u51fd_u65702
52 if _obj_0 ~= nil then
53 _obj_0((function()
54 local _obj_1 = _u51fd_u65701
55 if _obj_1 ~= nil then
56 return _obj_1("abc")
57 end
58 return nil
59 end)())
60 end
61end
62local _u53d8_u91cfc
63do
64 local _obj_0 = _u51fd_u65702
65 if _obj_0 ~= nil then
66 _u53d8_u91cfc = _obj_0((function()
67 local _obj_1 = _u51fd_u65701
68 if _obj_1 ~= nil then
69 return _obj_1("abc")
70 end
71 return nil
72 end)())
73 end
74end
75local _u51fd_u6570f
76_u51fd_u6570f = function()
77 local _obj_0 = x.y
78 if _obj_0 ~= nil then
79 return _obj_0["如果"](_obj_0, _u53c2_u6570)
80 end
81 return nil
82end
83_u51fd_u65702(998, "abc", _u51fd_u65701(_u51fd_u65700(233)))
84_u51fd_u65702(_u51fd_u65701(_u51fd_u65700(998, "abc", 233)))
85_u51fd_u6570f(1, 2, 3, 4, 5)
86_u51fd_u6570f(1, _u503c(2), 3, 4, 5)
87_u51fd_u6570f(1, 2, _u6570_u7ec4[3], 4, 5)
88local _u53d8_u91cfa = _u51fd_u65702(1, _u51fd_u65701(1, 2, 3, tonumber(table.concat({
89 "1",
90 "2",
91 "3"
92}, ""))), 3)
93_u6253_u5370(_u6e32_u67d3(_u53d1_u51fa(_u89e3_u6790(_u63d0_u53d6(_u8bfb_u6587_u4ef6("example.txt"), _u8bed_u8a00, { }), _u8bed_u8a00))))
94_u6253_u5370(_u6e32_u67d3(_u53d1_u51fa(_u89e3_u6790(_u63d0_u53d6(_u8bfb_u6587_u4ef6("example.txt"), _u8bed_u8a00, { }), _u8bed_u8a00))))
95_u6253_u5370(_u6e32_u67d3(_u53d1_u51fa(_u89e3_u6790(_u63d0_u53d6(_u8bfb_u6587_u4ef6("example.txt"), _u8bed_u8a00, { }), _u8bed_u8a00))))
96_u51fd_u6570f(not _u51fd_u6570(123))
97do
98 local _1 = abc(123, -_u51fd_u6570((function()
99 local _call_0 = _u5217_u8868({
100 "abc",
101 "xyz",
102 "123"
103 })
104 local _call_1 = _call_0["映射"](_call_0, "#")
105 return _call_1["值"](_call_1)
106 end)()), "x")
107 _2, _3, _4 = 1, 2, _u51fd_u6570f(3)
108 local _5
109 _5 = _u51fd_u65704(_u51fd_u65703(_u51fd_u65702(_u51fd_u65701(_u53d8_u91cfv, 1), 2), 3), 4)
110end
111local _u53d8_u91cfx = _u51fd_u6570b(_u51fd_u6570a(123)) or _u51fd_u6570d(_u51fd_u6570c(456)) or (function()
112 local _call_0 = _u51fd_u6570a["if"]
113 return _call_0["那么"](_call_0, "abc")
114end)() or (function()
115 local _obj_0 = _u51fd_u6570a
116 if _obj_0 ~= nil then
117 local _obj_1 = _obj_0["函数b"]
118 local _obj_2 = _obj_1["函数c"]
119 if _obj_2 ~= nil then
120 return _obj_2(_obj_1, 123)
121 end
122 return nil
123 end
124 return nil
125end)() or (function()
126 local _base_0 = _u53d8_u91cfx
127 local _fn_0 = _base_0["函数y"]
128 return _fn_0 and function(...)
129 return _fn_0(_base_0, ...)
130 end
131end)()
132local _u53d8_u91cfx1 = 3 * _u51fd_u6570f(-4)
133local _u53d8_u91cfx2 = 3 * _u51fd_u6570f(-2 ^ 2)
134local _u53d8_u91cfy = 1 + _u51fd_u6570b(3, (_u51fd_u6570a ^ _u51fd_u6570c)(not #2)) * _u51fd_u65701(_u51fd_u6570f(4 ^ -123)) or 123
135return nil
diff --git a/spec/outputs/unicode/plus.lua b/spec/outputs/unicode/plus.lua
new file mode 100644
index 0000000..75e4aac
--- /dev/null
+++ b/spec/outputs/unicode/plus.lua
@@ -0,0 +1,73 @@
1local _call_0 = _u53d8_u91cfx
2_call_0["执行"](_call_0, "工作")
3_u65b9_u6cd5((function()
4 local _call_1 = _u53d8_u91cfa
5 local _call_2 = _call_1["执行"](_call_1)
6 local _call_3 = _call_2["结束"](_call_2, "好")
7 return _call_3["如果"](_call_3, "abc", 123)
8end)())
9local _call_1 = _u53d8_u91cfb["函数"]
10local _call_2 = _call_1["执行"](_call_1)
11local _call_3 = _call_2["当"](_call_2, "好")
12local _u7ed3_u679c = _call_3["如果"](_call_3, "def", 998)
13local _call_4 = _u53d8_u91cfc["重复"]["如果"]
14local _call_5 = _call_4["然后"](_call_4, "xyz")
15_call_5["否则"](_call_5, _u7ed3_u679c)
16_u6253_u5370(self["循环"], self.__class["函数"](self.__class, 123))
17do
18 local _call_6 = _u6d88_u606f
19 local _u989c_u8272 = _call_6["匹配"](_call_6, "<%w*>")
20 if _u989c_u8272 then
21 local _call_7 = _u6d88_u606f
22 local _u6d88_u606f = _call_7["替换"](_call_7, "<%->", _u989c_u8272)
23 end
24end
25local _u6d88_u606f
26do
27 local _u989c_u8272 = _u6d88_u606f["匹配"](_u6d88_u606f, "<%w*>")
28 if _u989c_u8272 then
29 _u6d88_u606f = _u6d88_u606f["替换"](_u6d88_u606f, "<%->", _u989c_u8272)
30 end
31end
32local _u6570_u503cA
33do
34 local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5()
35 if _u65b9_u6cd5 then
36 _u6570_u503cA = _u65b9_u6cd5()
37 end
38end
39local _u6570_u503cA
40do
41 local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5()
42 if _u65b9_u6cd5 then
43 _u6570_u503cA = _u65b9_u6cd5()
44 end
45end
46local _u6570_u503cB
47do
48 local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5()
49 if _u65b9_u6cd5 ~= nil then
50 _u6570_u503cB = _u65b9_u6cd5()
51 end
52end
53_u80cc_u5305 = {
54 ["东西"] = {
55 ["好的"] = 200,
56 ["他们"] = function()
57 _u6253_u5370("你好")
58 return _u4f60_u7684_u811a("小")
59 end,
60 ["美丽"] = _u5934_u53d1,
61 ["黄金"] = _u55ef_u54fc
62 },
63 ["为什么"] = 1000,
64 ["吃"] = _u98df_u7269,
65 ["好的"] = _u670b_u53cb
66}
67local _u5f00_u59cb = {
68 ["东西"] = "冷"
69}
70local _u6d17_u6fa1
71_u6d17_u6fa1 = {
72 ["在"] = "火"
73}
diff --git a/spec/outputs/unicode/return.lua b/spec/outputs/unicode/return.lua
new file mode 100644
index 0000000..250932d
--- /dev/null
+++ b/spec/outputs/unicode/return.lua
@@ -0,0 +1,126 @@
1local _
2_ = function()
3 local _list_0 = _u7269_u54c1
4 for _index_0 = 1, #_list_0 do
5 local _u53d8_u91cfx = _list_0[_index_0]
6 _ = _u53d8_u91cfx
7 end
8end
9_ = function()
10 local _accum_0 = { }
11 local _len_0 = 1
12 local _list_0 = _u7269_u54c1
13 for _index_0 = 1, #_list_0 do
14 local _u53d8_u91cfx = _list_0[_index_0]
15 _accum_0[_len_0] = _u53d8_u91cfx
16 _len_0 = _len_0 + 1
17 end
18 return _accum_0
19end
20do
21 local _list_0 = _u7269_u54c1
22 for _index_0 = 1, #_list_0 do
23 local _u53d8_u91cfx = _list_0[_index_0]
24 return _u53d8_u91cfx
25 end
26end
27do
28 local _accum_0 = { }
29 local _len_0 = 1
30 local _list_0 = _u7269_u54c1
31 for _index_0 = 1, #_list_0 do
32 local _u53d8_u91cfx = _list_0[_index_0]
33 _accum_0[_len_0] = _u53d8_u91cfx
34 _len_0 = _len_0 + 1
35 end
36 return _accum_0
37end
38do
39 local _tbl_0 = { }
40 local _list_0 = _u7269_u54c1
41 for _index_0 = 1, #_list_0 do
42 local _u53d8_u91cfx, _u53d8_u91cfy = _list_0[_index_0]
43 _tbl_0[_u53d8_u91cfx] = _u53d8_u91cfy
44 end
45 return _tbl_0
46end
47_ = function()
48 if _u53d8_u91cfa then
49 if _u53d8_u91cfa then
50 return _u53d8_u91cfa
51 else
52 return _u53d8_u91cfb
53 end
54 elseif _u53d8_u91cfb then
55 if _u53d8_u91cfa then
56 return _u53d8_u91cfa
57 else
58 return _u53d8_u91cfb
59 end
60 else
61 if _u53d8_u91cfa then
62 return _u53d8_u91cfa
63 else
64 return _u53d8_u91cfb
65 end
66 end
67end
68do
69 if _u53d8_u91cfa then
70 if _u53d8_u91cfa then
71 return _u53d8_u91cfa
72 else
73 return _u53d8_u91cfb
74 end
75 elseif _u53d8_u91cfb then
76 if _u53d8_u91cfa then
77 return _u53d8_u91cfa
78 else
79 return _u53d8_u91cfb
80 end
81 else
82 if _u53d8_u91cfa then
83 return _u53d8_u91cfa
84 else
85 return _u53d8_u91cfb
86 end
87 end
88end
89do
90 return {
91 ["值"] = _u503c,
92 ["物品A"] = 123,
93 ["物品B"] = "abc"
94 }
95end
96do
97 local _tab_0 = {
98 1,
99 2
100 }
101 local _idx_0 = 1
102 for _key_0, _value_0 in pairs(_u4e09) do
103 if _idx_0 == _key_0 then
104 _tab_0[#_tab_0 + 1] = _value_0
105 _idx_0 = _idx_0 + 1
106 else
107 _tab_0[_key_0] = _value_0
108 end
109 end
110 _tab_0[#_tab_0 + 1] = 4
111 return _tab_0
112end
113_ = function()
114 local _base_0 = _u53d8_u91cfa
115 local _fn_0 = _base_0["变量b"]
116 return _fn_0 and function(...)
117 return _fn_0(_base_0, ...)
118 end
119end
120do
121 local _base_0 = _u53d8_u91cfa
122 local _fn_0 = _base_0["变量b"]
123 return _fn_0 and function(...)
124 return _fn_0(_base_0, ...)
125 end
126end
diff --git a/spec/outputs/unicode/string.lua b/spec/outputs/unicode/string.lua
new file mode 100644
index 0000000..6bfb033
--- /dev/null
+++ b/spec/outputs/unicode/string.lua
@@ -0,0 +1,53 @@
1local _u4f60_u597d = "你好"
2local _u95ee_u5019 = "啥事,好吧"
3_u6253_u5370(_u4f60_u597d)
4local _u55ef = '嗯'
5local _u8fd9_u91cc, _u53e6_u4e00_u4e2a = "好的", '世界'
6local _u5440 = "YU'M"
7_u4f60('我说:"嗯"')
8_u6253_u5370(_u5440, _u4f60)
9_u53e6_u4e00_u4e2a = [[ 你好 世界 ]]
10local _u4f60_u597d__u90a3_u91cc = [[ 你好呀
11]]
12local _u597d_u5427 = [==[ "helo" ]==]
13local _u54c8_u55bd = [===[ eat noots]===]
14local _u55ef_u55ef = [[well trhere]]
15local _u6587_u5b57 = [[
16nil
17Fail to compile
18]]
19_u6587_u5b57[ [[abc]]] = [["#{变量i}" for 变量i = 1, 10] for 变量i = 1, 10]]
20local _u54e6_u54e6 = ""
21local _u53d8_u91cfx = "\\"
22_u53d8_u91cfx = "a\\b"
23_u53d8_u91cfx = "\\\n"
24_u53d8_u91cfx = "\""
25local _u53d8_u91cfa = "你好 " .. tostring(_u95ee_u5019) .. " 你好"
26local _u53d8_u91cfb = tostring(_u95ee_u5019) .. " 你好"
27local _u53d8_u91cfc = "你好 " .. tostring(5 + 1)
28local _u53d8_u91cfd = tostring(_u4f60_u597d(_u4e16_u754c))
29local _u53d8_u91cfe = tostring(1) .. " " .. tostring(2) .. " " .. tostring(3)
30local _u53d8_u91cff = [[你好 #{世界} 世界]]
31local _u53d8_u91cfg = "#{你好 世界}"
32_u53d8_u91cfa = '你好 #{问候} 你好'
33_u53d8_u91cfb = '#{问候} 你好'
34_u53d8_u91cfc = '你好 #{问候}'
35local _u53d8_u91cf_ = "你好"
36local _call_0 = ("你好")
37_call_0["格式"](_call_0, 1)
38local _call_1 = ("你好")
39_call_1["格式"](_call_1, 1, 2, 3)
40local _call_2 = ("你好")
41_call_2["格式"](_call_2, 1, 2, 3)(1, 2, 3)
42local _call_3 = ("你好")
43_call_3["世界"](_call_3)
44local _call_4 = ("你好")
45_call_4["格式"](_call_4)["问候"](1, 2, 3)
46local _call_5 = ("你好")
47_call_5["格式"](_call_5, 1, 2, 3)
48local _call_6 = _u67d0_u4e8b("你好")
49_call_6["世界"](_call_6)
50return _u67d0_u4e8b((function()
51 local _call_7 = ("你好")
52 return _call_7["世界"](_call_7)
53end)())
diff --git a/spec/outputs/unicode/stub.lua b/spec/outputs/unicode/stub.lua
new file mode 100644
index 0000000..5f183a1
--- /dev/null
+++ b/spec/outputs/unicode/stub.lua
@@ -0,0 +1,26 @@
1local _u53d8_u91cfx = {
2 ["值"] = 100,
3 ["你好"] = function(self)
4 return _u6253_u5370(self.val)
5 end
6}
7local _u51fd_u6570
8do
9 local _base_0 = _u53d8_u91cfx
10 local _fn_0 = _base_0["值"]
11 _u51fd_u6570 = _fn_0 and function(...)
12 return _fn_0(_base_0, ...)
13 end
14end
15_u6253_u5370(_u51fd_u6570())
16_u6253_u5370(_u53d8_u91cfx["值"](_u53d8_u91cfx));
17(function(...)
18 do
19 local _base_0 = _u4f60_u597d(...)
20 local _fn_0 = _base_0["世界"]
21 _u53d8_u91cfx = _fn_0 and function(...)
22 return _fn_0(_base_0, ...)
23 end
24 end
25end)()
26return nil
diff --git a/spec/outputs/unicode/switch.lua b/spec/outputs/unicode/switch.lua
new file mode 100644
index 0000000..6b8bbdc
--- /dev/null
+++ b/spec/outputs/unicode/switch.lua
@@ -0,0 +1,401 @@
1do
2 local _exp_0 = _u503c
3 if "酷" == _exp_0 then
4 _u6253_u5370("你好,世界")
5 end
6end
7do
8 local _exp_0 = _u503c
9 if "酷" == _exp_0 then
10 _u6253_u5370("你好,世界")
11 else
12 _u6253_u5370("好的,很棒")
13 end
14end
15do
16 local _exp_0 = _u503c
17 if "酷" == _exp_0 then
18 _u6253_u5370("你好,世界")
19 elseif "是的" == _exp_0 then
20 local _u53d8_u91cf_ = [[FFFF]] + [[MMMM]]
21 elseif (2323 + 32434) == _exp_0 then
22 _u6253_u5370("好的")
23 else
24 _u6253_u5370("好的,很棒")
25 end
26end
27local _u8f93_u51fa
28do
29 local _exp_0 = _u503c
30 if "酷" == _exp_0 then
31 _u8f93_u51fa = _u6253_u5370("你好,世界")
32 else
33 _u8f93_u51fa = _u6253_u5370("好的,很棒")
34 end
35end
36do
37 local _exp_0 = _u503c
38 if "酷" == _exp_0 then
39 _u8f93_u51fa = _u53d8_u91cfx
40 elseif "哦" == _exp_0 then
41 _u8f93_u51fa = 34340
42 else
43 _u8f93_u51fa = error("这大大地失败了")
44 end
45end
46do
47 local _with_0 = _u4e1c_u897f
48 do
49 local _exp_0 = _with_0["值"](_with_0)
50 if _with_0["确定"] == _exp_0 then
51 local _u53d8_u91cf_ = "世界"
52 else
53 local _u53d8_u91cf_ = "是的"
54 end
55 end
56end
57_u4fee_u590d(_u8fd9_u4e2a)
58call_func((function()
59 local _exp_0 = _u67d0_u7269
60 if 1 == _exp_0 then
61 return "是"
62 else
63 return "否"
64 end
65end)())
66do
67 local _exp_0 = _u55e8
68 if (_u4f60_u597d or _u4e16_u754c) == _exp_0 then
69 local _u53d8_u91cf_ = _u7eff_u8272
70 end
71end
72do
73 local _exp_0 = _u55e8
74 if "一个" == _exp_0 or "两个" == _exp_0 then
75 _u6253_u5370("酷")
76 elseif "爸爸" == _exp_0 then
77 local _u53d8_u91cf_ = _u5426
78 end
79end
80do
81 local _exp_0 = _u55e8
82 if (3 + 1) == _exp_0 or _u4f60_u597d() == _exp_0 or (function()
83 return 4
84 end)() == _exp_0 then
85 local _u53d8_u91cf_ = _u9ec4_u8272
86 else
87 _u6253_u5370("酷")
88 end
89end
90do
91 local _u5b57_u5178 = {
92 { },
93 {
94 1,
95 2,
96 3
97 },
98 ["变量a"] = {
99 ["变量b"] = {
100 ["变量c"] = 1
101 }
102 },
103 ["变量x"] = {
104 ["变量y"] = {
105 ["变量z"] = 1
106 }
107 }
108 }
109 do
110 local _type_0 = type(_u5b57_u5178)
111 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
112 if _tab_0 then
113 local _u7b2c_u4e00 = _u5b57_u5178[1]
114 local _u4e00_u4e2a
115 do
116 local _obj_0 = _u5b57_u5178[2]
117 local _type_1 = type(_obj_0)
118 if "table" == _type_1 or "userdata" == _type_1 then
119 _u4e00_u4e2a = _obj_0[1]
120 end
121 end
122 local _u4e24_u4e2a
123 do
124 local _obj_0 = _u5b57_u5178[2]
125 local _type_1 = type(_obj_0)
126 if "table" == _type_1 or "userdata" == _type_1 then
127 _u4e24_u4e2a = _obj_0[2]
128 end
129 end
130 local _u4e09_u4e2a
131 do
132 local _obj_0 = _u5b57_u5178[2]
133 local _type_1 = type(_obj_0)
134 if "table" == _type_1 or "userdata" == _type_1 then
135 _u4e09_u4e2a = _obj_0[3]
136 end
137 end
138 local _u53d8_u91cfc
139 do
140 local _obj_0 = _u5b57_u5178["变量a"]
141 local _type_1 = type(_obj_0)
142 if "table" == _type_1 or "userdata" == _type_1 then
143 do
144 local _obj_1 = _obj_0["变量b"]
145 local _type_2 = type(_obj_1)
146 if "table" == _type_2 or "userdata" == _type_2 then
147 _u53d8_u91cfc = _obj_1["变量c"]
148 end
149 end
150 end
151 end
152 local _u53d8_u91cfz
153 do
154 local _obj_0 = _u5b57_u5178["变量x"]
155 local _type_1 = type(_obj_0)
156 if "table" == _type_1 or "userdata" == _type_1 then
157 do
158 local _obj_1 = _obj_0["变量y"]
159 local _type_2 = type(_obj_1)
160 if "table" == _type_2 or "userdata" == _type_2 then
161 _u53d8_u91cfz = _obj_1["变量z"]
162 end
163 end
164 end
165 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
167 _u6253_u5370(_u7b2c_u4e00, _u4e00_u4e2a, _u4e24_u4e2a, _u4e09_u4e2a, _u53d8_u91cfc, _u53d8_u91cfz)
168 end
169 end
170 end
171end
172do
173 local _u7269_u54c1 = {
174 {
175 ["变量x"] = 100,
176 ["变量y"] = 200
177 },
178 {
179 ["宽度"] = 300,
180 ["高度"] = 400
181 },
182 false
183 }
184 for _index_0 = 1, #_u7269_u54c1 do
185 local _u7269 = _u7269_u54c1[_index_0]
186 do
187 local _type_0 = type(_u7269)
188 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
189 local _match_0 = false
190 if _tab_0 then
191 local _u53d8_u91cfx = _u7269["变量x"]
192 local _u53d8_u91cfy = _u7269["变量y"]
193 if _u53d8_u91cfx ~= nil and _u53d8_u91cfy ~= nil then
194 _match_0 = true
195 _u6253_u5370("Vec2 " .. tostring(_u53d8_u91cfx) .. ", " .. tostring(_u53d8_u91cfy))
196 end
197 end
198 if not _match_0 then
199 local _match_1 = false
200 if _tab_0 then
201 local _u5bbd_u5ea6 = _u7269["宽度"]
202 local _u9ad8_u5ea6 = _u7269["高度"]
203 if _u5bbd_u5ea6 ~= nil and _u9ad8_u5ea6 ~= nil then
204 _match_1 = true
205 _u6253_u5370("Size " .. tostring(_u5bbd_u5ea6) .. ", " .. tostring(_u9ad8_u5ea6))
206 end
207 end
208 if not _match_1 then
209 if false == _u7269 then
210 _u6253_u5370("没有")
211 else
212 local _match_2 = false
213 if _tab_0 then
214 local _u7c7b = _u7269["__类"]
215 if _u7c7b ~= nil then
216 _match_2 = true
217 if _u7c7b_u522bA == _u7c7b then
218 _u6253_u5370("对象 A")
219 elseif _u7c7b_u522bB == _u7c7b then
220 _u6253_u5370("对象 B")
221 end
222 end
223 end
224 if not _match_2 then
225 local _match_3 = false
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
237 end
238 end
239 end
240 end
241 end
242end
243do
244 local _u8868_u683c = { }
245 do
246 local _type_0 = type(_u8868_u683c)
247 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
248 if _tab_0 then
249 local _u53d8_u91cfa = _u8868_u683c["变量a"]
250 local _u53d8_u91cfb = _u8868_u683c["变量b"]
251 if _u53d8_u91cfa == nil then
252 _u53d8_u91cfa = 1
253 end
254 if _u53d8_u91cfb == nil then
255 _u53d8_u91cfb = 2
256 end
257 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb)
258 end
259 end
260 do
261 local _type_0 = type(_u8868_u683c)
262 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
263 if _tab_0 then
264 local _u53d8_u91cfa = _u8868_u683c["变量a"]
265 local _u53d8_u91cfb = _u8868_u683c["变量b"]
266 if _u53d8_u91cfb == nil then
267 _u53d8_u91cfb = 2
268 end
269 if _u53d8_u91cfa ~= nil then
270 _u6253_u5370("部分匹配", _u53d8_u91cfa, _u53d8_u91cfb)
271 end
272 end
273 end
274 do
275 local _type_0 = type(_u8868_u683c)
276 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
277 local _match_0 = false
278 if _tab_0 then
279 local _u53d8_u91cfa = _u8868_u683c["变量a"]
280 local _u53d8_u91cfb = _u8868_u683c["变量b"]
281 if _u53d8_u91cfa ~= nil and _u53d8_u91cfb ~= nil then
282 _match_0 = true
283 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb)
284 end
285 end
286 if not _match_0 then
287 _u6253_u5370("没有匹配")
288 end
289 end
290end
291do
292 local _u8868_u683c = {
293 ["变量x"] = "abc"
294 }
295 do
296 local _type_0 = type(_u8868_u683c)
297 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
298 local _match_0 = false
299 if _tab_0 then
300 local _u53d8_u91cfx = _u8868_u683c["变量x"]
301 local _u53d8_u91cfy = _u8868_u683c["变量y"]
302 if _u53d8_u91cfx ~= nil and _u53d8_u91cfy ~= nil then
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
314 end
315 end
316end
317do
318 local _u5339_u914d
319 do
320 local _exp_0 = _u8868_u683c
321 if 1 == _exp_0 then
322 _u5339_u914d = "1"
323 else
324 local _type_0 = type(_exp_0)
325 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
326 local _match_0 = false
327 if _tab_0 then
328 local _u53d8_u91cfx = _exp_0["变量x"]
329 if _u53d8_u91cfx ~= nil then
330 _match_0 = true
331 _u5339_u914d = _u53d8_u91cfx
332 end
333 end
334 if not _match_0 then
335 if false == _exp_0 then
336 _u5339_u914d = "false"
337 else
338 _u5339_u914d = nil
339 end
340 end
341 end
342 end
343end
344do
345 local _exp_0 = _u8868_u683c
346 if nil == _exp_0 then
347 return "无效"
348 else
349 do
350 local _type_0 = type(_exp_0)
351 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
352 local _match_0 = false
353 if _tab_0 then
354 local _u53d8_u91cfa = _exp_0["变量a"]
355 local _u53d8_u91cfb = _exp_0["变量b"]
356 if _u53d8_u91cfa ~= nil and _u53d8_u91cfb ~= nil then
357 _match_0 = true
358 return tostring(_u53d8_u91cfa + _u53d8_u91cfb)
359 end
360 end
361 if not _match_0 then
362 if 1 == _exp_0 or 2 == _exp_0 or 3 == _exp_0 or 4 == _exp_0 or 5 == _exp_0 then
363 return "数字 1 - 5"
364 else
365 local _match_1 = false
366 if _tab_0 then
367 local _u5339_u914d_u4efb_u4f55_u8868_u683c = _exp_0["匹配任何表格"]
368 if _u5339_u914d_u4efb_u4f55_u8868_u683c == nil then
369 _u5339_u914d_u4efb_u4f55_u8868_u683c = "后备"
370 end
371 _match_1 = true
372 return _u5339_u914d_u4efb_u4f55_u8868_u683c
373 end
374 if not _match_1 then
375 return "除非它不是一个表格,否则不应到达这里"
376 end
377 end
378 end
379 end
380 end
381end
382do
383 do
384 local _exp_0 = _u53d8_u91cfy
385 local _type_0 = type(_exp_0)
386 local _tab_0 = "table" == _type_0 or "userdata" == _type_0
387 if _tab_0 then
388 local _u8868 = (function()
389 local _obj_0 = _exp_0["变量x"]
390 if _obj_0 ~= nil then
391 return getmetatable(_obj_0)
392 end
393 return nil
394 end)()
395 if _u8868 ~= nil then
396 _u6253_u5370(_u8868)
397 end
398 end
399 end
400end
401return nil
diff --git a/spec/outputs/unicode/syntax.lua b/spec/outputs/unicode/syntax.lua
new file mode 100644
index 0000000..664fa46
--- /dev/null
+++ b/spec/outputs/unicode/syntax.lua
@@ -0,0 +1,431 @@
1local _u53d8_u91cfa = 1 + 2 * 3 / 6
2local _u4e00_u5806, _u53bb, _u8fd9_u91cc
3_u53d8_u91cfa, _u4e00_u5806, _u53bb, _u8fd9_u91cc = _u53e6_u5916, _u4e16_u754c, nil, nil
4_u51fd_u6570(_u53c2_u65701, _u53c2_u65702, _u53e6_u5916, _u53c2_u65703)
5local _u6211_u4eec
6_u8fd9_u91cc, _u6211_u4eec = function() end, _u662f_u7684
7local _u8fd9_u4e2a, _u4e0d_u540c
8_u8fd9_u4e2a, _u4e0d_u540c = function()
9 return _u65b9_u6cd5
10end, _u662f_u7684
11_u7238_u7238()
12_u7238_u7238(_u4e3b)
13_u4f60_u597d(_u4e00, _u4e8c)();
14(5 + 5)(_u4e16_u754c)
15_u4e50_u8da3(_u53d8_u91cfa)(_u53d8_u91cfb)
16_u4e50_u8da3(_u53d8_u91cfa)(_u53d8_u91cfb)
17_u4e50_u8da3(_u53d8_u91cfa)(_u53d8_u91cfb, _u574f(_u4f60_u597d))
18_u4f60_u597d(_u4e16_u754c(_u4f60_u5728_u8fd9_u91cc_u505a_u4ec0_u4e48))
19_u4ec0_u4e48(_u8fd9_u4e2a)[3243](_u4e16_u754c, _u54ce_u5440)
20_u6bdb_u8338_u8338[_u624b][_u662f](_u6076_u5fc3)(_u597d_u7684(_u597d_u7684[_u4e16_u754c]))
21local _ = (_u5f97_u5230[_u67d0_u4e8b] + 5)[_u5e74]
22local _u53d8_u91cfi, _u53d8_u91cfx = 200, 300
23local _u662f_u7684 = (1 + 5) * 3
24_u662f_u7684 = ((1 + 5) * 3) / 2
25_u662f_u7684 = ((1 + 5) * 3) / 2 + _u53d8_u91cfi % 100
26local _u54c7 = (1 + 2) * (3 + 4) * (4 + 5)
27_ = function()
28 if _u67d0_u4e8b then
29 return 1, 2, 4
30 end
31 return _u6253_u5370("你好")
32end
33_ = function()
34 if _u4f60_u597d then
35 return "你好", "世界"
36 else
37 return _u4e0d, _u65b9_u6cd5
38 end
39end
40_ = function()
41 return 1, 2, 34
42end
43return 5 + function()
44 return 4 + 2
45end
46return 5 + (function()
47 return 4
48end) + 2
49_u6253_u5370(5 + function()
50 _ = 34
51 return _u597d(_u7403)
52end)
53_u67d0_u4e8b('其他', "是")
54_u67d0_u4e8b('其他')
55_u67d0_u4e8b("其他")
56_ = _u67d0_u4e8b([[嘿]]) * 2
57_ = _u67d0_u4e8b([======[嘿]======]) * 2
58_ = _u67d0_u4e8b[ [======[嘿]======]] * 2
59_, _ = _u67d0_u4e8b('其他'), 2
60_, _ = _u67d0_u4e8b("其他"), 2
61_, _ = _u67d0_u4e8b([[其他]]), 2
62_, _ = _u67d0_u4e8b[ [[其他]]], 2
63_u67d0_u4e8b('其他', 2)
64_u67d0_u4e8b("其他", 2)
65_u67d0_u4e8b([[其他]], 2)
66_ = _u8fd9_u91cc(_u6211_u4eec)("去")[12123]
67local _call_0 = _u5206_u88c2("abc xyz 123")
68local _call_1 = _call_0["映射"](_call_0, "#")
69_call_1["打印全部"](_call_1)
70_ = f("")[_u53d8_u91cfa]
71local _call_2 = f("")
72_ = _call_2["变量b"](_call_2)
73_ = f("")["变量c"]()
74f(("")[_u53d8_u91cfa])
75f((function()
76 local _call_3 = ("")
77 return _call_3["变量b"](_call_3)
78end)())
79f(("")["变量c"]())
80local _call_3 = _u5217_u8868({
81 "abc",
82 "xyz",
83 "123"
84})
85local _call_4 = _call_3["映射"](_call_3, "#")
86_call_4["打印全部"](_call_4)
87_ = f({ })[_u53d8_u91cfa]
88local _call_5 = f({ })
89_ = _call_5["变量b"](_call_5)
90_ = f({ })["变量c"]()
91local _u67d0_u4e8b = {
92 ["测试"] = 12323,
93 ["什么"] = function()
94 return _u6253_u5370("你好 世界")
95 end
96}
97_u6253_u5370(_u67d0_u4e8b["测试"])
98local _u5929_u54ea = {
99 ["你好"] = "世界"
100}
101local _u6c29 = {
102 ["数字"] = 100,
103 ["世界"] = function(_u81ea_u5df1)
104 _u6253_u5370(_u81ea_u5df1["数字"])
105 return {
106 ["某事"] = function()
107 return _u6253_u5370("嗨 从某事")
108 end
109 }
110 end,
111 ["某事"] = function(_u81ea_u5df1, _u5b57_u7b26_u4e32)
112 _u6253_u5370("字符串是", _u5b57_u7b26_u4e32)
113 return {
114 ["世界"] = function(_u53d8_u91cfa, _u53d8_u91cfb)
115 return _u6253_u5370("总和", _u53d8_u91cfa + _u53d8_u91cfb)
116 end
117 }
118 end
119}
120_u67d0_u4e8b["什么"]()
121_u6c29["世界"](_u6c29)["某事"]()
122_u6c29["某事"](_u6c29, "200")["世界"](1, 2)
123_u53d8_u91cfx = -434
124_u53d8_u91cfx = -_u4f60_u597d(_u4e16_u754c(_u4e00(_u4e8c)))
125local _u55e8 = -"herfef"
126_u53d8_u91cfx = -(function()
127 local _accum_0 = { }
128 local _len_0 = 1
129 for _u53d8_u91cfx in _u53d8_u91cfx do
130 _accum_0[_len_0] = _u53d8_u91cfx
131 _len_0 = _len_0 + 1
132 end
133 return _accum_0
134end)()
135if _u9177 then
136 _u6253_u5370("你好")
137end
138if not _u9177 then
139 _u6253_u5370("你好")
140end
141if not (1212 and 3434) then
142 _u6253_u5370("你好")
143end
144for i = 1, 10 do
145 _u6253_u5370("你好")
146end
147_u6253_u5370("疯子")
148if _u4f60_u597d then
149 _ = 343
150end
151if _u9177 then
152 _u6253_u5370("什么")
153end
154while not (function()
155 local _call_6 = _u9605_u8bfb_u8005
156 return _call_6["结束"](_call_6)
157 end)() do
158 local _call_6 = _u9605_u8bfb_u8005
159 _call_6["解析_行"](_call_6)
160end
161while not (function()
162 local _call_6 = _u9605_u8bfb_u8005
163 return _call_6["结束"](_call_6)
164 end)() do
165 local _call_6 = _u9605_u8bfb_u8005
166 _call_6["解析_行"](_call_6)
167end
168(function(...)
169 local _u53c2_u6570 = {
170 ...
171 }
172end)()
173_u53d8_u91cfx = function(...)
174 return dump({
175 ...
176 })
177end
178_u53d8_u91cfx = not true
179local _u53d8_u91cfy = not (5 + 5)
180_u53d8_u91cfy = #"你好"
181_u53d8_u91cfx = #{
182 #{ },
183 #{
184 1
185 },
186 #{
187 1,
188 2
189 }
190}
191_, _ = _u4f60_u597d, _u4e16_u754c
192_u67d0_u4e8b["你好"](_u67d0_u4e8b, _u4ec0_u4e48)(_u53d8_u91cfa, _u53d8_u91cfb)
193_u67d0_u4e8b["你好"](_u67d0_u4e8b, _u4ec0_u4e48)
194local _call_6 = _u67d0_u4e8b["你好"]
195_call_6["世界"](_call_6, _u53d8_u91cfa, _u53d8_u91cfb)
196local _call_7 = _u67d0_u4e8b["你好"]
197_call_7["世界"](_call_7, 1, 2, 3)(_u53d8_u91cfa, _u53d8_u91cfb)
198_u53d8_u91cfx = 1232
199_u53d8_u91cfx = _u53d8_u91cfx + (10 + 3)
200local _u53d8_u91cfj = _u53d8_u91cfj - "你好"
201_u53d8_u91cfy = _u53d8_u91cfy * 2
202_u53d8_u91cfy = _u53d8_u91cfy / 100
203_u53d8_u91cfy = _u53d8_u91cfy // 100
204local _u53d8_u91cfm = _u53d8_u91cfm % 2
205local _u4f60_u597d = _u4f60_u597d .. "世界"
206self.__class["某事"] = self.__class["某事"] + 10
207self["某事"] = self["某事"] + 10
208local _update_0 = "你好"
209_u53d8_u91cfa[_update_0] = _u53d8_u91cfa[_update_0] + 10
210local _update_1 = "你好" .. tostring(tostring(ff))
211_u53d8_u91cfa[_update_1] = _u53d8_u91cfa[_update_1] + 10
212local _obj_0 = _u53d8_u91cfa[_u56db]
213_obj_0["字段x"] = _obj_0["字段x"] + 10
214_u53d8_u91cfa["变量b"] = _u53d8_u91cfa["变量b"] + 1
215local _obj_1 = _u53d8_u91cfa["变量b"][1]["变量c"]
216local _update_2 = 2 + 3
217_obj_1[_update_2] = _obj_1[_update_2] + 1
218do
219 local _with_0 = _u8868
220 local _obj_2 = _with_0["字段a"]
221 _obj_2["变量c"] = _obj_2["变量c"] + 1
222end
223do
224 local _obj_2 = _u8868
225 _obj_2[#_obj_2 + 1] = 10
226end
227do
228 local _obj_2 = _u53d8_u91cfa["变量b"]["变量c"]
229 _obj_2[#_obj_2 + 1] = 1
230end
231if _u6761_u4ef6v then
232 _u53d8_u91cfx[#_u53d8_u91cfx + 1] = 1
233else
234 _u53d8_u91cfx[#_u53d8_u91cfx + 1] = 2
235end
236do
237 local _with_0 = _u8868
238 do
239 local _obj_2 = _with_0["变量b"]["变量c"]
240 do
241 local _with_1 = _u5411_u91cf
242 _with_1["字段x"] = 1
243 _with_1["字段y"] = 2
244 _obj_2[#_obj_2 + 1] = _with_1
245 end
246 end
247end
248do
249 local _call_8 = _u5bf9_u8c61a["变量b"]["变量c"]["变量d"]
250 local _obj_2 = _call_8["函数"](_call_8)["变量g"]
251 _obj_2[#_obj_2 + 1] = 1
252end
253local _u8868 = { }
254_u8868[#_u8868 + 1] = 1
255_u8868[#_u8868 + 1] = 2
256_u8868[#_u8868 + 1] = 3
257_u53d8_u91cfx = 0
258local _list_0 = _u503c
259for _index_0 = 1, #_list_0 do
260 local _u53d8_u91cfv = _list_0[_index_0]
261 if ntype(_u53d8_u91cfv) == "函数定义" then
262 _ = _u53d8_u91cfx + 1
263 end
264end
265_u4f60_u597d = {
266 ["某物"] = _u4e16_u754c,
267 ["如果"] = "你好",
268 ["否则"] = 3434,
269 ["函数"] = "好的",
270 ["好的"] = 230203
271}
272_u8868 = {
273 ["执行"] = _u53d8_u91cfb,
274 _u6267_u884c({
275 ["变量b"] = _u53d8_u91cfb
276 })
277}
278div({
279 ["类"] = "酷"
280})
281_ = 5 + _u4ec0_u4e48(_u65e0_u804a)
282_u4ec0_u4e48(_u65e0_u804a + 5)
283_ = 5 - _u4ec0_u4e48(_u65e0_u804a)
284_u4ec0_u4e48(_u65e0_u804a - 5)
285_u53d8_u91cfx = _u4f60_u597d - _u4e16_u754c - _u67d0_u7269;
286(function(_u67d0_u7269)
287 if _u67d0_u7269 == nil then
288 _u67d0_u7269 = _u4e0e((function()
289 local _call_8 = _u4ec0_u4e48
290 return _call_8["酷"](_call_8, 100)
291 end)())
292 end
293 return _u6253_u5370(_u67d0_u7269)
294end)()
295if _u67d0_u7269 then
296 _ = 03589
297else
298 _ = 3434
299end
300if _u67d0_u7269 then
301 _ = _u662f_u7684
302elseif "嗯嗯嗯" then
303 _u6253_u5370("酷")
304else
305 _ = _u597d_u7684
306end
307_u53d8_u91cfx = _u4e0d_u662f_u67d0_u7269
308_u53d8_u91cfy = _u5982_u679c_u67d0_u7269
309local _u53d8_u91cfz = _u53d8_u91cfx(_u4e0e(_u53d8_u91cfb))
310_u53d8_u91cfz = _u53d8_u91cfx(_u4e0eb)
311while 10 > _u67d0_u7269({
312 ["某物"] = "世界"
313 }) do
314 _u6253_u5370("是的")
315end
316_u53d8_u91cfx = {
317 ["好的"] = _u786e_u5b9a
318}
319_u662f_u7684({
320 ["好的"] = _u7537_u4eba,
321 ["确定"] = _u5148_u751f
322})
323_u4f60_u597d("无逗号", {
324 ["是的"] = _u7238_u7238,
325 ["另一个"] = _u4e16_u754c
326})
327_u4f60_u597d("逗号", {
328 ["某物"] = _u4f60_u597d__u4e16_u754c,
329 ["骂人"] = _u4f60
330})
331_u53e6_u4e00_u4e2a(_u4f60_u597d, _u4e00_u4e2a, _u4e8c, _u4e09, _u56db, {
332 ["是的"] = _u7537_u4eba,
333 ["好的"] = _u662f_u7684,
334 ["好"] = _u597d_u7684
335})
336_u53e6_u4e00_u4e2a(_u4f60_u597d, _u4e00_u4e2a, _u4e8c, _u4e09, _u56db, {
337 ["是的"] = _u7537_u4eba,
338 ["好的"] = _u662f_u7684,
339 {
340 ["好"] = _u597d_u7684,
341 ["好的"] = 1
342 },
343 {
344 ["好"] = _u597d_u7684,
345 ["好的"] = 2
346 }
347})
348_u53e6_u4e00_u4e2a(_u4f60_u597d, _u4e00_u4e2a, _u4e8c, _u4e09, _u56db, {
349 ["是的"] = _u7537_u4eba,
350 ["好的"] = _u662f_u7684
351})
352_u53e6_u4e00_u4e2a(_u4f60_u597d, _u4e00_u4e2a, _u4e8c, _u4e09, _u56db, {
353 ["是的"] = _u7537_u4eba({
354 ["好的"] = _u662f_u7684
355 })
356})
357_u963f_u8d3e_u514b_u65af(_u5730_u5740, function(_u6570_u636e)
358 return _u5904_u7406(_u6570_u636e)
359end, function(_u9519_u8bef)
360 return _u6253_u5370(_u9519_u8bef)
361end)
362_u53d8_u91cfa = _u53d8_u91cfa + (3 - 5)
363_u53d8_u91cfa = _u53d8_u91cfa * (3 + 5)
364_u53d8_u91cfa = _u53d8_u91cfa * 3
365_u53d8_u91cfa = _u53d8_u91cfa >> 3
366_u53d8_u91cfa = _u53d8_u91cfa << 3
367_u53d8_u91cfa = _u53d8_u91cfa / _u51fd_u6570("酷")
368_u53d8_u91cfx["然后"] = "你好"
369_u53d8_u91cfx["当"]["真"] = "你好"
370_u53d8_u91cfx["当"]["真"] = "你好"
371_u53d8_u91cfx = _u53d8_u91cfx or "你好"
372_u53d8_u91cfx = _u53d8_u91cfx and "你好"
373_u53d8_u91cfz = _u53d8_u91cfa - _u53d8_u91cfb
374_u53d8_u91cfz = _u53d8_u91cfa(-_u53d8_u91cfb)
375_u53d8_u91cfz = _u53d8_u91cfa - _u53d8_u91cfb
376_u53d8_u91cfz = _u53d8_u91cfa - _u53d8_u91cfb
377local _u5b57_u7b26_u4e32 = _u5b57_u7b26_u4e32A .. _u5b57_u7b26_u4e32B .. _u5b57_u7b26_u4e32C
378_u51fd_u6570(3000, "192.168.1.1")
379local f
380f = function()
381 return _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff
382end
383f = function()
384 return _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff
385end
386do
387 local _with_0 = _u5bf9_u8c61
388 _u8c03_u7528(_with_0["函数"](_with_0), 123, "abc")
389end
390_u8c03_u7528A(_u8c03_u7528B(_u8c03_u7528C(123)))
391_u8c03_u7528A(_u8c03_u7528B(_u8c03_u7528C(123)))
392local _u53d8_u91cfv = {
393 _u53d8_u91cfa(-1),
394 _u53d8_u91cfa(-1),
395 _u53d8_u91cfa - 1,
396 _u53d8_u91cfa - 1,
397 _u53d8_u91cfa - 1,
398 _u53d8_u91cfa - 1,
399 _u53d8_u91cfa - 1,
400 _u53d8_u91cfa - 1,
401 _u53d8_u91cfa(~1),
402 _u53d8_u91cfa(~1),
403 _u53d8_u91cfa ~ 1,
404 _u53d8_u91cfa ~ 1,
405 _u53d8_u91cfa ~ 1,
406 _u53d8_u91cfa ~ 1,
407 _u53d8_u91cfa ~ 1,
408 _u53d8_u91cfa ~ 1
409}
410do
411 _u53d8_u91cfa = 1 + 2 * 3 / 4
412 local _u53d8_u91cf_1 = f1(-1 + 2 + 3)
413 local _u53d8_u91cf_2 = f1 - 1 + 2 + 3
414 local f2
415 f2 = function(_u53d8_u91cfx)
416 return _u6253_u5370(_u53d8_u91cfx + 1)
417 end
418 _u53d8_u91cfa = f2()
419 f2(-1)
420 _u53d8_u91cfa = f2() - f2(1)
421 local _u53d8_u91cf_3, _u53d8_u91cf_4
422 _u53d8_u91cf_1, _u53d8_u91cf_2, _u53d8_u91cf_3, _u53d8_u91cf_4 = 1, f(2, 3, f(4, 4))
423end
424do
425 f = function(_u53d8_u91cfa, _u53d8_u91cfb)
426 return _u53d8_u91cfa + _u53d8_u91cfb
427 end
428 f(_u53d8_u91cfa, _u53d8_u91cfb)
429 f()
430end
431return nil
diff --git a/spec/outputs/unicode/tables.lua b/spec/outputs/unicode/tables.lua
new file mode 100644
index 0000000..28ad6e2
--- /dev/null
+++ b/spec/outputs/unicode/tables.lua
@@ -0,0 +1,594 @@
1local _u80cc_u5305 = {
2 ["东西"] = {
3 ["是的"] = 200,
4 ["他们"] = function()
5 print("你好")
6 return _u4f60_u7684_u811a("小")
7 end,
8 ["美丽"] = _u5934_u53d1_u53d8_u91cf,
9 ["金"] = _u55ef_u53d8_u91cf
10 },
11 ["您"] = 1000,
12 ["吃"] = goo_u53d8_u91cf,
13 ["是的"] = dudd_u53d8_u91cf
14}
15local _u5f00_u59cb = {
16 ["东西"] = "冷"
17}
18local _u6d74 = {
19 ["开"] = "火"
20}
21local _u53e6_u4e00_u4e2a = {
22 [4] = 232,
23 ["好食物"] = "是最好的"
24}
25local fwip_u53d8_u91cf = {
26 ["东西"] = _u4f60_u597d("什么"),
27 ["数字"] = 2323,
28 ["什么"] = yo_u53d8_u91cf("妈妈", "是的"),
29 ["水果"] = basket_u53d8_u91cf,
30 ["坚果"] = day_u53d8_u91cf
31}
32local frick_u53d8_u91cf = {
33 ["你好"] = "世界"
34}
35local frack_u53d8_u91cf, _u6700_u597d = {
36 ["你好"] = "世界",
37 ["米饭"] = 3434
38}, "什么"
39local ya_u53d8_u91cf = {
40 1,
41 2,
42 3,
43 ["键"] = 100,
44 343,
45 "你好",
46 ["嗯"] = 232
47}
48local x_u53d8_u91cf = {
49 1,
50 2,
51 4343,
52 343,
53 343
54}
55local g_u53d8_u91cf, p_u53d8_u91cf = {
56 1,
57 2,
58 ["nowy变量"] = "是",
59 3,
60 4,
61 ["嘿"] = 232,
62 ["另一个"] = "天"
63}, 234
64local annother_u53d8_u91cf = {
65 1,
66 2,
67 3,
68 3,
69 4,
70 5,
71 6,
72 7,
73 8
74}
75local _u662f_u7684_u53d8_u91cf = {
76 [232] = 3434,
77 "你好",
78 ["冰"] = "蛋糕"
79}
80local whatabout_u53d8_u91cf = {
81 _u4f60_u597d(_u4e16_u754c, _u53e6_u4e00_u4e2a_u53d8_u91cf),
82 _u4ec0_u4e48,
83 _u5173_u4e8e,
84 _u73b0_u5728,
85 _u4f60_u597d("世界"),
86 _u662f_u7684_u53d8_u91cf,
87 _u4f60_u597d("世界", _u662f_u7684_u53d8_u91cf)
88}
89x_u53d8_u91cf = {
90 ["东西"] = function(self)
91 return "你好"
92 end,
93 ["酷"] = {
94 ["床"] = {
95 2323,
96 2323
97 },
98 ["红"] = 2343
99 },
100 ["名字"] = function(self, node_u53d8_u91cf)
101 return self:value(node_u53d8_u91cf)
102 end
103}
104x_u53d8_u91cf = {
105 ["东西"] = _u4e1c_u897f,
106 ["东西"] = _u4e1c_u897f_u53d8_u91cf
107}
108local y_u53d8_u91cf = {
109 ["你好"] = _u4f60_u597d,
110 ["那里"] = _u90a3_u91cc,
111 ["怎么样"] = _u600e_u4e48_u6837,
112 ["你"] = _u4f60,
113 ["事情"] = _u4e8b_u60c5
114}
115_u7535_u8bdd_u6211("你好", {
116 ["x变量"] = x_u53d8_u91cf,
117 ["y变量"] = y_u53d8_u91cf,
118 ["z变量"] = z_u53d8_u91cf
119})
120local t_u53d8_u91cf = {
121 ["a变量"] = 'a',
122 [b_u53d8_u91cf] = 'b'
123}
124local xam_u53d8_u91cf = {
125 ["你好"] = 1234,
126 ["你好"] = 12354,
127 [ [[你好变量]]] = 12354,
128 ["你好"] = 12354,
129 [ [[你好变量]]] = 12354
130}
131local kam_u53d8_u91cf = {
132 ["你好"] = 12,
133 ["好奶酪"] = "嗯",
134 ["是的"] = 12 + 232,
135 ["让我们"] = keepit({
136 ["继续"] = _u771f_u7684,
137 ["好的"] = "是的"
138 }),
139 ["更多"] = {
140 1,
141 (function()
142 local _accum_0 = { }
143 local _len_0 = 1
144 for x_u53d8_u91cf = 1, 10 do
145 _accum_0[_len_0] = x_u53d8_u91cf
146 _len_0 = _len_0 + 1
147 end
148 return _accum_0
149 end)()
150 },
151 [{
152 "一个",
153 "两个"
154 }] = _u4e00_u4ef6_u4e8b_u60c5(function(self) end)
155}
156keepit({
157 ["继续"] = _u771f_u7684,
158 ["好的"] = "是的",
159 ["workd变量"] = "好的"
160})
161_u4e8b_u60c5({
162 ["什么"] = "伟大",
163 ["没有"] = "更多",
164 ["好的"] = 123
165})
166_u4e8b_u60c5({
167 ["什么"] = "伟大",
168 ["没有"] = "更多"
169})
170local __u53d8_u91cf = {
171 ["好的"] = 123
172}
173local k_u53d8_u91cf = {
174 ["你好"] = "世界"
175}
176k_u53d8_u91cf = {
177 ['你好'] = '世界'
178}
179k_u53d8_u91cf = {
180 ["你好"] = '世界',
181 ["帽子"] = "zat变量"
182}
183_u8bf7({
184 ["你好"] = "世界"
185})
186k_u53d8_u91cf = {
187 ["你好"] = "世界",
188 ["一个"] = "区域"
189}
190local f1_u53d8_u91cf, f2_u53d8_u91cf, f3_u53d8_u91cf = "一个", {
191 ["两个"] = three_u53d8_u91cf
192}, "四"
193f1_u53d8_u91cf, f2_u53d8_u91cf = {
194 ["两个"] = three_u53d8_u91cf
195}, "四"
196f1_u53d8_u91cf = {
197 "一个",
198 ["两个"] = three_u53d8_u91cf,
199 "四"
200}
201local j1_u53d8_u91cf, j2_u53d8_u91cf, j3_u53d8_u91cf, j4_u53d8_u91cf = "一个", {
202 ["两个"] = three_u53d8_u91cf,
203 ["四"] = five_u53d8_u91cf
204}, 6, 7
205local _u5973_u82f1_u96c4 = {
206 ["名字"] = "克里斯蒂娜",
207 ["年龄"] = 18,
208 ["工作"] = "公主",
209 ["喜欢"] = {
210 {
211 ["名字"] = "小猫",
212 ["img变量"] = "/image/kittens.png"
213 },
214 {
215 ["名字"] = "花",
216 ["img变量"] = "/image/flower.png"
217 }
218 },
219 ["物品"] = {
220 {
221 ["名字"] = "戒指",
222 ["数量"] = 2
223 },
224 {
225 ["名字"] = "项链",
226 ["数量"] = 1
227 }
228 },
229 ["状态"] = {
230 ["desc变量"] = "弱",
231 {
232 ["属性"] = "健康",
233 ["价值"] = 50
234 },
235 {
236 ["属性"] = "魔法",
237 ["价值"] = 100
238 }
239 }
240}
241local _u5e93_u5b58 = {
242 ["设备"] = {
243 "剑",
244 "盾"
245 },
246 ["物品"] = {
247 {
248 ["名字"] = "药水",
249 ["计数"] = 10
250 },
251 {
252 ["名字"] = "面包",
253 ["计数"] = 3
254 }
255 }
256}
257local _u7269_u54c1 = {
258 _u51fd_u6570(),
259 (function()
260 local _with_0 = _u53d8_u91cftb
261 _with_0.abc = 123
262 return _with_0
263 end)(),
264 {
265 1,
266 2,
267 3
268 },
269 _u51fd_u6570({
270 1,
271 2,
272 3
273 }),
274 _u51fd_u6570({
275 1,
276 2,
277 3
278 }),
279 (function()
280 local _accum_0 = { }
281 local _len_0 = 1
282 for _u53d8_u91cfi = 1, 3 do
283 _accum_0[_len_0] = _u53d8_u91cfi
284 _len_0 = _len_0 + 1
285 end
286 return _accum_0
287 end)(),
288 tostring((function()
289 if _u53d8_u91cfa then
290 return _u53d8_u91cfb
291 end
292 end)())
293}
294local _u53cc_u9879 = {
295 {
296 "国王",
297 "王后"
298 },
299 {
300 "英雄",
301 "公主"
302 }
303}
304_u7269_u54c1 = {
305 {
306 ["名称"] = "戒指",
307 ["数量"] = 2
308 },
309 {
310 ["名称"] = "项链",
311 ["数量"] = 1
312 }
313}
314local _u83dc_u5355 = {
315 {
316 ["文本"] = "保存",
317 ["子菜单"] = {
318 {
319 ["文本"] = "插槽1:" .. (_u63d2_u69fd[1]["名称"] or "无"),
320 ["点击"] = function() end
321 },
322 {
323 ["文本"] = {
324 "插槽2"
325 },
326 ["点击"] = function() end
327 },
328 {
329 ["文本"] = [[插槽3]],
330 ["点击"] = function() end
331 },
332 {
333 ["文本"] = (function()
334 local _call_0 = ("插槽4")
335 return _call_0["名称"](_call_0)
336 end)(),
337 ["点击"] = function() end
338 },
339 {
340 ["文本"] = (function()
341 local _call_0 = ({
342 {
343 "插槽5"
344 }
345 })[1]
346 return _call_0["名称"](_call_0)
347 end)(),
348 ["点击"] = function() end
349 },
350 [6] = {
351 ["文本"] = ("插槽6"),
352 ["点击"] = function() end
353 }
354 }
355 }
356}
357local _u53d8_u91cftb
358do
359 local _tab_0 = { }
360 local _idx_0 = 1
361 for _key_0, _value_0 in pairs(_u5176_u4ed6) do
362 if _idx_0 == _key_0 then
363 _tab_0[#_tab_0 + 1] = _value_0
364 _idx_0 = _idx_0 + 1
365 else
366 _tab_0[_key_0] = _value_0
367 end
368 end
369 _u53d8_u91cftb = _tab_0
370end
371local tb_u6df7_u5408
372do
373 local _tab_0 = {
374 1,
375 2,
376 3
377 }
378 local _obj_0
379 _u7269_u54c1.x = 1
380 _u7269_u54c1["函数"](_u7269_u54c1)
381 _obj_0 = _u7269_u54c1
382 local _idx_0 = 1
383 for _key_0, _value_0 in pairs(_obj_0) do
384 if _idx_0 == _key_0 then
385 _tab_0[#_tab_0 + 1] = _value_0
386 _idx_0 = _idx_0 + 1
387 else
388 _tab_0[_key_0] = _value_0
389 end
390 end
391 _tab_0[#_tab_0 + 1] = "a"
392 _tab_0[#_tab_0 + 1] = "b"
393 _tab_0[#_tab_0 + 1] = "c"
394 local _obj_1
395 do
396 local _obj_2 = _u51fd_u6570
397 if _obj_2 ~= nil then
398 _obj_1 = _obj_2()
399 end
400 end
401 local _idx_1 = 1
402 for _key_0, _value_0 in pairs(_obj_1) do
403 if _idx_1 == _key_0 then
404 _tab_0[#_tab_0 + 1] = _value_0
405 _idx_1 = _idx_1 + 1
406 else
407 _tab_0[_key_0] = _value_0
408 end
409 end
410 _tab_0["键"] = "值"
411 for _index_0 = 1, select('#', ...) do
412 _tab_0[#_tab_0 + 1] = select(_index_0, ...)
413 end
414 tb_u6df7_u5408 = _tab_0
415end
416local tb_u6df7_u5408A
417do
418 local _tab_0 = { }
419 local _obj_0
420 do
421 local _accum_0 = { }
422 local _len_0 = 1
423 for _u53d8_u91cfi = 1, 10 do
424 _accum_0[_len_0] = _u53d8_u91cfi
425 _len_0 = _len_0 + 1
426 end
427 _obj_0 = _accum_0
428 end
429 local _idx_0 = 1
430 for _key_0, _value_0 in pairs(_obj_0) do
431 if _idx_0 == _key_0 then
432 _tab_0[#_tab_0 + 1] = _value_0
433 _idx_0 = _idx_0 + 1
434 else
435 _tab_0[_key_0] = _value_0
436 end
437 end
438 _tab_0[#_tab_0 + 1] = 11
439 tb_u6df7_u5408A = _tab_0
440end
441local tb_u6df7_u5408B
442do
443 local _tab_0 = { }
444 local _obj_0 = ...
445 local _idx_0 = 1
446 for _key_0, _value_0 in pairs(_obj_0) do
447 if _idx_0 == _key_0 then
448 _tab_0[#_tab_0 + 1] = _value_0
449 _idx_0 = _idx_0 + 1
450 else
451 _tab_0[_key_0] = _value_0
452 end
453 end
454 local _obj_1 = {
455 ...
456 }
457 local _idx_1 = 1
458 for _key_0, _value_0 in pairs(_obj_1) do
459 if _idx_1 == _key_0 then
460 _tab_0[#_tab_0 + 1] = _value_0
461 _idx_1 = _idx_1 + 1
462 else
463 _tab_0[_key_0] = _value_0
464 end
465 end
466 local _obj_2
467 do
468 local _tab_1 = { }
469 local _obj_3 = ...
470 local _idx_2 = 1
471 for _key_0, _value_0 in pairs(_obj_3) do
472 if _idx_2 == _key_0 then
473 _tab_1[#_tab_1 + 1] = _value_0
474 _idx_2 = _idx_2 + 1
475 else
476 _tab_1[_key_0] = _value_0
477 end
478 end
479 _obj_2 = _tab_1
480 end
481 local _idx_2 = 1
482 for _key_0, _value_0 in pairs(_obj_2) do
483 if _idx_2 == _key_0 then
484 _tab_0[#_tab_0 + 1] = _value_0
485 _idx_2 = _idx_2 + 1
486 else
487 _tab_0[_key_0] = _value_0
488 end
489 end
490 _tab_0[#_tab_0 + 1] = 1
491 _tab_0[#_tab_0 + 1] = 2
492 _tab_0[#_tab_0 + 1] = 3
493 tb_u6df7_u5408B = _tab_0
494end
495local _u6a21_u677f <const> = {
496 foo = "你好",
497 bar = "世界",
498 baz = "!"
499}
500local _u4e13_u95e8_u5316 <const> = (function()
501 local _tab_0 = { }
502 local _idx_0 = 1
503 for _key_0, _value_0 in pairs(_u6a21_u677f) do
504 if _idx_0 == _key_0 then
505 _tab_0[#_tab_0 + 1] = _value_0
506 _idx_0 = _idx_0 + 1
507 else
508 _tab_0[_key_0] = _value_0
509 end
510 end
511 _tab_0.bar = "鲍勃"
512 return _tab_0
513end)()
514local _u4e13_u95e8_u5316B
515do
516 local _tab_0 = {
517 ["函数"] = function() end
518 }
519 local _idx_0 = 1
520 for _key_0, _value_0 in pairs(_u6a21_u677f) do
521 if _idx_0 == _key_0 then
522 _tab_0[#_tab_0 + 1] = _value_0
523 _idx_0 = _idx_0 + 1
524 else
525 _tab_0[_key_0] = _value_0
526 end
527 end
528 _tab_0["结束"] = function() end
529 _tab_0["如果"] = true
530 _tab_0["否则"] = false
531 _u4e13_u95e8_u5316B = _tab_0
532end
533local _u90e8_u5206 = {
534 "肩膀",
535 "膝盖"
536}
537local _u6b4c_u8bcd
538do
539 local _tab_0 = {
540 "头"
541 }
542 local _idx_0 = 1
543 for _key_0, _value_0 in pairs(_u90e8_u5206) do
544 if _idx_0 == _key_0 then
545 _tab_0[#_tab_0 + 1] = _value_0
546 _idx_0 = _idx_0 + 1
547 else
548 _tab_0[_key_0] = _value_0
549 end
550 end
551 _tab_0[#_tab_0 + 1] = "和"
552 _tab_0[#_tab_0 + 1] = "脚趾"
553 _u6b4c_u8bcd = _tab_0
554end
555local tb_u5757 = {
556 ["子菜单"] = (function(...)
557 local _tab_0 = {
558 ["值"] = _u503c
559 }
560 local _idx_0 = 1
561 for _key_0, _value_0 in pairs(_u7269_u54c1) do
562 if _idx_0 == _key_0 then
563 _tab_0[#_tab_0 + 1] = _value_0
564 _idx_0 = _idx_0 + 1
565 else
566 _tab_0[_key_0] = _value_0
567 end
568 end
569 for _index_0 = 1, select('#', ...) do
570 _tab_0[#_tab_0 + 1] = select(_index_0, ...)
571 end
572 return _tab_0
573 end)(...)
574}
575_u51fd_u6570((function(...)
576 local _tab_0 = { }
577 local _idx_0 = 1
578 for _key_0, _value_0 in pairs(_u7269_u54c1) do
579 if _idx_0 == _key_0 then
580 _tab_0[#_tab_0 + 1] = _value_0
581 _idx_0 = _idx_0 + 1
582 else
583 _tab_0[_key_0] = _value_0
584 end
585 end
586 _tab_0["值"] = _u503c
587 _tab_0[#_tab_0 + 1] = ...
588 _tab_0.k = _u53d8_u91cfv
589 for _index_0 = 1, select('#', ...) do
590 _tab_0[#_tab_0 + 1] = select(_index_0, ...)
591 end
592 return _tab_0
593end)(...))
594return nil
diff --git a/spec/outputs/unicode/try_catch.lua b/spec/outputs/unicode/try_catch.lua
new file mode 100644
index 0000000..fde63d6
--- /dev/null
+++ b/spec/outputs/unicode/try_catch.lua
@@ -0,0 +1,61 @@
1xpcall(_u51fd_u6570, function(_u9519_u8bef)
2 return _u6253_u5370(_u9519_u8bef)
3end, 1, 2, 3)
4xpcall(_u51fd_u6570, function(_u9519_u8bef)
5 return _u6253_u5370(_u9519_u8bef)
6end, 1, 2, 3)
7pcall(function()
8 _u6253_u5370("正在try")
9 return _u51fd_u6570(1, 2, 3)
10end)
11do
12 local _u6210_u529f, _u7ed3_u679c = xpcall(_u51fd_u6570, function(_u9519_u8bef)
13 return _u6253_u5370(_u9519_u8bef)
14 end, 1, 2, 3)
15 _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, 1, 2, 3)
16end
17pcall(_u8868["函数"])
18pcall(_u8868["函数"])
19pcall(_u8868["函数"])
20pcall((_u8868["函数"]))
21pcall(((function()
22 local _base_0 = _u8868
23 local _fn_0 = _base_0["函数"]
24 return _fn_0 and function(...)
25 return _fn_0(_base_0, ...)
26 end
27end)()), 1, 2, 3)
28pcall(_u8868["函数"], 1)
29pcall(_u8868["函数"], 1)
30if (xpcall(_u51fd_u6570, function(_u9519_u8bef)
31 return _u6253_u5370(_u9519_u8bef)
32end, 1)) then
33 _u6253_u5370("好的")
34end
35if xpcall((_u51fd_u6570), function(_u9519_u8bef)
36 return _u6253_u5370(_u9519_u8bef)
37end, 1) then
38 _u6253_u5370("好的")
39end
40do
41 do
42 local _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, "abc", 123)
43 if _u6210_u529f then
44 _u6253_u5370(_u7ed3_u679c)
45 end
46 end
47 local _u6210_u529f, _u7ed3_u679c = xpcall(_u51fd_u6570, function(_u9519_u8bef)
48 return _u6253_u5370(_u9519_u8bef)
49 end, "abc", 123)
50 _u6210_u529f, _u7ed3_u679c = xpcall(_u51fd_u6570, function(_u9519_u8bef)
51 return _u6253_u5370(_u9519_u8bef)
52 end, "abc", 123)
53 if _u6210_u529f then
54 _u6253_u5370(_u7ed3_u679c)
55 end
56end
57do
58pcall(_u51fd_u6570, 1, 2, 3)
59pcall(_u51fd_u6570, 1, 2, 3)
60end
61return nil
diff --git a/spec/outputs/unicode/unless_else.lua b/spec/outputs/unicode/unless_else.lua
new file mode 100644
index 0000000..38b2e63
--- /dev/null
+++ b/spec/outputs/unicode/unless_else.lua
@@ -0,0 +1,7 @@
1if _u53d8_u91cfa then
2 if not _u53d8_u91cfb then
3 return _u6253_u5370("嗨")
4 elseif _u53d8_u91cfc then
5 return _u6253_u5370("不嗨")
6 end
7end
diff --git a/spec/outputs/unicode/using.lua b/spec/outputs/unicode/using.lua
new file mode 100644
index 0000000..8b6bd1c
--- /dev/null
+++ b/spec/outputs/unicode/using.lua
@@ -0,0 +1,30 @@
1local _u4f60_u597d = "你好"
2local _u4e16_u754c = "世界"
3local _
4_ = function()
5 local _u4f60_u597d = 3223
6end
7_ = function(_u53c2_u6570a)
8 local _u4f60_u597d = 3223
9 _u53c2_u6570a = 323
10end
11_ = function(_u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c)
12 _u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c = 1, 2, 3
13 local _u4e16_u754c = 12321
14end
15_ = function(_u53c2_u6570a, _u53c2_u6570e, _u53c2_u6570f)
16 local _u53c2_u6570b, _u53c2_u6570c
17 _u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c = 1, 2, 3
18 local _u4f60_u597d = 12321
19 local _u4e16_u754c = "yeah"
20end
21_ = function()
22 local _u4f60_u597d = _u4f60_u597d or 2
23end
24do
25 local _u53d8_u91cfa = { }
26 _(function()
27 local _u5143_u7d20x, _u5143_u7d20y = _u53d8_u91cfa[1], _u53d8_u91cfa[2]
28 end)
29end
30return nil
diff --git a/spec/outputs/unicode/vararg.lua b/spec/outputs/unicode/vararg.lua
new file mode 100644
index 0000000..782bf22
--- /dev/null
+++ b/spec/outputs/unicode/vararg.lua
@@ -0,0 +1,301 @@
1local _u8fde_u63a5
2_u8fde_u63a5 = function(...)
3 _u5e26_u6709((function()
4 local _with_0 = _u53d8_u91cfa
5 _with_0["函数"](_with_0)
6 return _with_0
7 end)())
8 _u5e26_u6709((function(...)
9 local _with_0 = _u53d8_u91cfa
10 _with_0["函数"](_with_0, ...)
11 return _with_0
12 end)(...))
13 _u5217_u8868_u751f_u6210((function()
14 local _accum_0 = { }
15 local _len_0 = 1
16 for i = 1, 10 do
17 _accum_0[_len_0] = _u9879_u76ee[i]
18 _len_0 = _len_0 + 1
19 end
20 return _accum_0
21 end)())
22 _u5217_u8868_u751f_u6210((function(...)
23 local _accum_0 = { }
24 local _len_0 = 1
25 for i = 1, 10 do
26 _accum_0[_len_0] = _u9879_u76ee[i](...)
27 _len_0 = _len_0 + 1
28 end
29 return _accum_0
30 end)(...))
31 _u5217_u8868_u751f_u6210((function()
32 local _accum_0 = { }
33 local _len_0 = 1
34 local _list_0 = _u9879_u76ee
35 for _index_0 = 1, #_list_0 do
36 local _u7269_u54c1 = _list_0[_index_0]
37 _accum_0[_len_0] = _u7269_u54c1
38 _len_0 = _len_0 + 1
39 end
40 return _accum_0
41 end)())
42 _u5217_u8868_u751f_u6210((function(...)
43 local _accum_0 = { }
44 local _len_0 = 1
45 local _list_0 = _u9879_u76ee
46 for _index_0 = 1, #_list_0 do
47 local _u7269_u54c1 = _list_0[_index_0]
48 _accum_0[_len_0] = _u7269_u54c1(...)
49 _len_0 = _len_0 + 1
50 end
51 return _accum_0
52 end)(...))
53 _u7c7b_u751f_u6210((function()
54 local _u53d8_u91cfA
55 do
56 local _class_0
57 local _base_0 = { }
58 if _base_0.__index == nil then
59 _base_0.__index = _base_0
60 end
61 _class_0 = setmetatable({
62 __init = function() end,
63 __base = _base_0,
64 __name = "变量A"
65 }, {
66 __index = _base_0,
67 __call = function(cls, ...)
68 local _self_0 = setmetatable({ }, _base_0)
69 cls.__init(_self_0, ...)
70 return _self_0
71 end
72 })
73 _base_0.__class = _class_0
74 local self = _class_0;
75 _u51fd_u6570()
76 _u53d8_u91cfA = _class_0
77 return _class_0
78 end
79 end)())
80 _u7c7b_u751f_u6210((function(...)
81 local _u53d8_u91cfA
82 do
83 local _class_0
84 local _base_0 = { }
85 if _base_0.__index == nil then
86 _base_0.__index = _base_0
87 end
88 _class_0 = setmetatable({
89 __init = function() end,
90 __base = _base_0,
91 __name = "变量A"
92 }, {
93 __index = _base_0,
94 __call = function(cls, ...)
95 local _self_0 = setmetatable({ }, _base_0)
96 cls.__init(_self_0, ...)
97 return _self_0
98 end
99 })
100 _base_0.__class = _class_0
101 local self = _class_0;
102 _u51fd_u6570(...)
103 _u53d8_u91cfA = _class_0
104 return _class_0
105 end
106 end)(...))
107 _u8868_u751f_u6210((function()
108 local _tbl_0 = { }
109 for _u952e, _u503c in pairs(_u8868) do
110 _tbl_0[_u952e] = _u503c
111 end
112 return _tbl_0
113 end)())
114 _u8868_u751f_u6210((function(...)
115 local _tbl_0 = { }
116 for _u952e, _u503c in pairs(_u8868) do
117 _tbl_0[_u952e] = _u503c(...)
118 end
119 return _tbl_0
120 end)(...))
121 _u8868_u751f_u6210((function()
122 local _tbl_0 = { }
123 local _list_0 = _u9879_u76ee
124 for _index_0 = 1, #_list_0 do
125 local _u7269_u54c1 = _list_0[_index_0]
126 _tbl_0[_u7269_u54c1] = true
127 end
128 return _tbl_0
129 end)())
130 _u8868_u751f_u6210((function(...)
131 local _tbl_0 = { }
132 local _list_0 = _u9879_u76ee
133 for _index_0 = 1, #_list_0 do
134 local _u7269_u54c1 = _list_0[_index_0]
135 _tbl_0[_u7269_u54c1(...)] = true
136 end
137 return _tbl_0
138 end)(...))
139 _u505a_u64cd_u4f5c((function()
140 return _u51fd_u6570()
141 end)())
142 _u505a_u64cd_u4f5c((function(...)
143 return _u51fd_u6570(...)
144 end)(...))
145 _u5f53_u64cd_u4f5c((function()
146 local _accum_0 = { }
147 local _len_0 = 1
148 while false do
149 _accum_0[_len_0] = _u51fd_u6570()
150 _len_0 = _len_0 + 1
151 end
152 return _accum_0
153 end)())
154 _u5f53_u64cd_u4f5c((function(...)
155 local _accum_0 = { }
156 local _len_0 = 1
157 while false do
158 _accum_0[_len_0] = _u51fd_u6570(...)
159 _len_0 = _len_0 + 1
160 end
161 return _accum_0
162 end)(...))
163 _u5982_u679c_u64cd_u4f5c((function()
164 if false then
165 return _u51fd_u6570()
166 end
167 end)())
168 _u5982_u679c_u64cd_u4f5c((function(...)
169 if false then
170 return _u51fd_u6570(...)
171 end
172 end)(...))
173 _u9664_u975e_u64cd_u4f5c((function()
174 if not true then
175 return _u51fd_u6570()
176 end
177 end)())
178 _u9664_u975e_u64cd_u4f5c((function(...)
179 if not true then
180 return _u51fd_u6570(...)
181 end
182 end)(...))
183 _u5207_u6362_u64cd_u4f5c((function()
184 local _exp_0 = _u53d8_u91cfx
185 if "abc" == _exp_0 then
186 return _u51fd_u6570()
187 end
188 end)())
189 _u5207_u6362_u64cd_u4f5c((function(...)
190 local _exp_0 = _u53d8_u91cfx
191 if "abc" == _exp_0 then
192 return _u51fd_u6570(...)
193 end
194 end)(...))
195 _u8868_u8fbe_u5f0f_u64cd_u4f5c((function()
196 local _obj_0 = _u51fd_u6570
197 if _obj_0 ~= nil then
198 return _obj_0()
199 end
200 return nil
201 end)())
202 _u8868_u8fbe_u5f0f_u64cd_u4f5c((function(...)
203 local _obj_0 = _u51fd_u6570
204 if _obj_0 ~= nil then
205 return _obj_0(...)
206 end
207 return nil
208 end)(...))
209 _u5192_u53f7((function()
210 local _base_0 = f()
211 local _fn_0 = _base_0["函数"]
212 return _fn_0 and function(...)
213 return _fn_0(_base_0, ...)
214 end
215 end)())
216 _u5192_u53f7((function(...)
217 local _base_0 = f(...)
218 local _fn_0 = _base_0["函数"]
219 return _fn_0 and function(...)
220 return _fn_0(_base_0, ...)
221 end
222 end)(...))
223 local _
224 _ = function()
225 local _u5217_u8868 = {
226 1,
227 2,
228 3,
229 4,
230 5
231 }
232 local _u51fd_u6570_u540d
233 _u51fd_u6570_u540d = function(_u786e_u5b9a)
234 return _u786e_u5b9a, table.unpack(_u5217_u8868)
235 end
236 return (function(_arg_0, ...)
237 local _u786e_u5b9a = _arg_0
238 _u6253_u5370(_u786e_u5b9a, ...)
239 local _u591a_u53c2_u6570_u51fd_u6570
240 _u591a_u53c2_u6570_u51fd_u6570 = function()
241 return 10, nil, 20, nil, 30
242 end
243 return (function(...)
244 _u6253_u5370(select("#", ...))
245 return _u6253_u5370(...)
246 end)(_u591a_u53c2_u6570_u51fd_u6570())
247 end)(_u51fd_u6570_u540d(true))
248 end
249 do
250 (function(...)
251 return _u6253_u5370(...)
252 end)((function()
253 if true then
254 return 1, 2
255 end
256 end)())
257 end
258 do
259 (function(_arg_0, ...)
260 local _u53d8_u91cfa = _arg_0
261 return _u6253_u5370(_u53d8_u91cfa, select('#', ...))
262 end)((function()
263 if not true then
264 return 1, 2
265 end
266 end)())
267 end
268 do
269 (function(...)
270 return _u6253_u5370(...)
271 end)((function()
272 local _exp_0 = _u53d8_u91cfx
273 if 1 == _exp_0 then
274 local _with_0 = _u8868
275 _with_0["变量x"] = 123
276 return _with_0
277 else
278 return _u88682
279 end
280 end)())
281 end
282 do
283 (function(...)
284 return _u6253_u5370(...)
285 end)(1, 2, (function()
286 if _u6761_u4ef6 then
287 return 3, 4, 5
288 end
289 end)())
290 end
291 do
292 (function(_arg_0, ...)
293 local _u8868 = _arg_0
294 return _u6253_u5370(...)
295 end)({
296 ["名字"] = "abc",
297 ["值"] = 123
298 })
299 end
300 return nil
301end
diff --git a/spec/outputs/unicode/whitespace.lua b/spec/outputs/unicode/whitespace.lua
new file mode 100644
index 0000000..d026abb
--- /dev/null
+++ b/spec/outputs/unicode/whitespace.lua
@@ -0,0 +1,98 @@
1local _ = {
2 1,
3 2
4}
5_ = {
6 1,
7 2
8}
9_ = {
10 1,
11 2
12}
13_ = {
14 1,
15 2
16}
17_ = {
18 1,
19 2
20}
21_ = {
22 _u4e8b_u60c5(1, 2, 4, 5, 6),
23 3,
24 4,
25 5
26}
27_ = {
28 _u53d8_u91cfa(1, 2, 3),
29 4,
30 5,
31 6,
32 1,
33 2,
34 3
35}
36_ = {
37 _u53d8_u91cfb(1, 2, 3, 4, 5, 6),
38 1,
39 2,
40 3,
41 1,
42 2,
43 3
44}
45_ = {
46 1,
47 2,
48 3
49}
50_ = {
51 _u53d8_u91cfc(1, 2, 3)
52}
53_u4f60_u597d(1, 2, 3, 4, 1, 2, 3, 4, 4, 5)
54_u53d8_u91cfx(1, 2, 3, 4, 5, 6)
55_u4f60_u597d(1, 2, 3, _u4e16_u754c(4, 5, 6, 5, 6, 7, 8))
56_u4f60_u597d(1, 2, 3, _u4e16_u754c(4, 5, 6, 5, 6, 7, 8), 9, 9)
57_ = {
58 _u4f60_u597d(1, 2),
59 3,
60 4,
61 5,
62 6
63}
64local _u53d8_u91cfx = {
65 _u4f60_u597d(1, 2, 3, 4, 5, 6, 7),
66 1,
67 2,
68 3,
69 4
70}
71if _u4f60_u597d(1, 2, 3, _u4e16_u754c, _u4e16_u754c) then
72 _u6253_u5370("你好")
73end
74if _u4f60_u597d(1, 2, 3, _u4e16_u754c, _u4e16_u754c) then
75 _u6253_u5370("你好")
76end
77_u53d8_u91cfa(_u4e00_u4e2a, _u4e24_u4e2a, _u4e09_u4e2a)
78_u53d8_u91cfb(_u4e00_u4e2a, _u4e24_u4e2a, _u4e09_u4e2a)
79_u53d8_u91cfc(_u4e00_u4e2a, _u4e24_u4e2a, _u4e09_u4e2a, _u56db_u4e2a)
80local v
81v = function()
82 return _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc
83end
84local v1, v2, v3
85v1, v2, v3 = function()
86 return _u53d8_u91cfa
87end, _u53d8_u91cfb, _u53d8_u91cfc
88local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff = 1, f2({
89 abc = abc
90}), 3, 4, _u51fd_u65705(abc), 6
91for _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc in pairs(_u5bf9_u8c61tb) do
92 _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc)
93end
94for i = 1, 10, -1 do
95 _u6253_u5370(i)
96end
97local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc
98return nil
diff --git a/spec/outputs/unicode/with.lua b/spec/outputs/unicode/with.lua
new file mode 100644
index 0000000..0dcd4a7
--- /dev/null
+++ b/spec/outputs/unicode/with.lua
@@ -0,0 +1,222 @@
1do
2 local _u53d8_u91cfa
3 _u53d8_u91cfa = function()
4 local _with_0 = _u4e1c_u897f
5 _u6253_u5370(_with_0["你好"])
6 _u6253_u5370(_u4f60_u597d)
7 _u6253_u5370("世界")
8 return _with_0
9 end
10end
11do
12 do
13 local _with_0 = _u53f6_u5b50
14 _with_0["世界"]()
15 _with_0["世界"](1, 2, 3)
16 local _u53d8_u91cfg = _with_0["什么"]["是"]["这"]
17 _with_0["你好"](1, 2, 3)
18 _with_0["你好"](_with_0, 1, 2)["世界"](2323)
19 _with_0["你好"](_with_0, "是的", "伙计")
20 _with_0["世界"] = 200
21 end
22end
23do
24 local _u6ecb_u6ecb_u6ecb
25 do
26 local _with_0 = _u4e1c_u897f
27 _with_0["设置状态"]("你好 世界")
28 _u6ecb_u6ecb_u6ecb = _with_0
29 end
30end
31do
32 local _u53d8_u91cfx = 5 + (function()
33 local _with_0 = _u67d0_u4e8b()
34 _with_0["写"](_with_0, "你好 世界")
35 return _with_0
36 end)()
37end
38do
39 local _u53d8_u91cfx = {
40 ["你好"] = (function()
41 local _with_0 = _u597d_u7684
42 _with_0["确定"](_with_0)
43 return _with_0
44 end)()
45 }
46end
47do
48 do
49 local _with_0 = _u4e1c_u897f
50 local _ = _with_0["属性"](_with_0, "某物")["你好"]
51 local _call_0 = _with_0["属性"]
52 _call_0["发送"](_call_0, _u4e00_u4e2a)
53 local _call_1 = _with_0["属性"]
54 _call_1["发送"](_call_1, _u4e00_u4e2a)
55 end
56end
57do
58 do
59 local _with_0 = _u53d8_u91cfa
60 _u6253_u5370(_with_0["世界"])
61 end
62 local _u6a21_u5757
63 do
64 local __u6a21_u5757 = { }
65 __u6a21_u5757["事物"] = "你好"
66 _u6a21_u5757 = __u6a21_u5757
67 end
68 do
69 local _u53d8_u91cfa, _u53d8_u91cfb = _u4e1c_u897f, _u5e03
70 _u6253_u5370(_u53d8_u91cfa["世界"])
71 end
72 local _u53d8_u91cfx
73 do
74 local _u53d8_u91cfa, _u53d8_u91cfb = 1, 2
75 _u6253_u5370(_u53d8_u91cfa + _u53d8_u91cfb)
76 _u53d8_u91cfx = _u53d8_u91cfa
77 end
78 _u6253_u5370((function()
79 local _u53d8_u91cfa, _u53d8_u91cfb = 1, 2
80 _u6253_u5370(_u53d8_u91cfa + _u53d8_u91cfb)
81 return _u53d8_u91cfa
82 end)())
83 local p
84 do
85 local _with_0 = 1
86 _u4f60_u597d()["字段x"], _u4e16_u754c()["字段y"] = _with_0, 2
87 _u6253_u5370(_u53d8_u91cfa + _u53d8_u91cfb)
88 p = _with_0
89 end
90end
91do
92 local _u53d8_u91cfx = "你好"
93 _u53d8_u91cfx["大写"](_u53d8_u91cfx)
94end
95do
96 do
97 local _u53d8_u91cfk = "乔"
98 _u6253_u5370(_u53d8_u91cfk["大写"](_u53d8_u91cfk))
99 end
100end
101do
102 do
103 local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", ""
104 _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa))
105 end
106end
107do
108 local _u53d8_u91cfa = "床铺"
109 do
110 local _u53d8_u91cfb, _u53d8_u91cfc
111 _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", ""
112 _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa))
113 end
114end
115do
116 do
117 local _with_0 = _u53d8_u91cfj
118 _u6253_u5370(_with_0["大写"](_with_0))
119 end
120end
121do
122 do
123 local _with_0 = "乔"
124 _u53d8_u91cfk["变量j"] = _with_0
125 _u6253_u5370(_with_0["大写"](_with_0))
126 end
127end
128do
129 do
130 local _with_0 = _u53d8_u91cfa
131 _u6253_u5370(_with_0.b)
132 do
133 local _with_1 = _with_0.c
134 _u6253_u5370(_with_1.d)
135 end
136 end
137end
138do
139 do
140 local _with_0 = _u53d8_u91cfa
141 do
142 local _with_1 = 2
143 _with_0.b = _with_1
144 _u6253_u5370(_with_1.c)
145 end
146 end
147end
148do
149 local _
150 _ = function()
151 local _with_0 = _u55e8
152 return _with_0.a, _with_0.b
153 end
154end
155do
156 do
157 local _with_0 = _u8868_u683c
158 local _call_0 = _u9879_u76ee["字段"]
159 _with_0.x = _call_0["函数"](_call_0, 123)
160 end
161end
162do
163 do
164 local _with_0 = _u7238_u7238
165 _with_0["如果"]("是的")
166 local _u53d8_u91cfy = _with_0["结束"]["函数"]
167 end
168end
169do
170 do
171 local _with_0 = _u8868_u683c
172 do
173 local _obj_0 = _with_0[2]
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
185 _with_0[#_with_0 + 1] = "abc"
186 _with_0[#_with_0 + 1] = {
187 ["类型"] = "你好",
188 {
189 ["名字"] = "xyz",
190 ["值"] = 998
191 }
192 }
193 end
194end
195do
196 do
197 local _with_0 = _u5b9e_u5fc3_u77e9_u5f62({
198 ["宽"] = w,
199 ["高"] = h,
200 ["颜色"] = 0x66000000
201 })
202 _u63a9_u7801 = _with_0
203 if _with_0 ~= nil then
204 _with_0["触摸启用"] = true
205 _with_0["吞噬触摸"] = true
206 end
207 end
208end
209do
210 do
211 local _u63a9_u7801 = _u5b9e_u5fc3_u77e9_u5f62({
212 ["宽"] = w,
213 ["高"] = h,
214 ["颜色"] = 0x66000000
215 })
216 if _u63a9_u7801 ~= nil then
217 _u63a9_u7801["触摸启用"] = true
218 _u63a9_u7801["吞噬触摸"] = true
219 end
220 end
221end
222return nil