diff options
Diffstat (limited to 'spec/outputs')
42 files changed, 8708 insertions, 11 deletions
diff --git a/spec/outputs/plus.lua b/spec/outputs/plus.lua index 749e830..bd89bfe 100644 --- a/spec/outputs/plus.lua +++ b/spec/outputs/plus.lua | |||
| @@ -1,16 +1,18 @@ | |||
| 1 | x["do"](x, "work") | 1 | local _call_0 = x |
| 2 | _call_0["do"](_call_0, "work") | ||
| 2 | func((function() | 3 | func((function() |
| 3 | local _call_0 = a["do"](a) | 4 | local _call_1 = a |
| 4 | local _call_1 = _call_0["end"](_call_0, "OK") | 5 | local _call_2 = _call_1["do"](_call_1) |
| 5 | return _call_1["if"](_call_1, "abc", 123) | 6 | local _call_3 = _call_2["end"](_call_2, "OK") |
| 7 | return _call_3["if"](_call_3, "abc", 123) | ||
| 6 | end)()) | 8 | end)()) |
| 7 | local _call_0 = b["function"] | 9 | local _call_1 = b["function"] |
| 8 | local _call_1 = _call_0["do"](_call_0) | 10 | local _call_2 = _call_1["do"](_call_1) |
| 9 | local _call_2 = _call_1["while"](_call_1, "OK") | 11 | local _call_3 = _call_2["while"](_call_2, "OK") |
| 10 | local res = _call_2["if"](_call_2, "def", 998) | 12 | local res = _call_3["if"](_call_3, "def", 998) |
| 11 | local _call_3 = c["repeat"]["if"] | 13 | local _call_4 = c["repeat"]["if"] |
| 12 | local _call_4 = _call_3["then"](_call_3, "xyz") | 14 | local _call_5 = _call_4["then"](_call_4, "xyz") |
| 13 | _call_4["else"](_call_4, res) | 15 | _call_5["else"](_call_5, res) |
| 14 | print(self["for"], self.__class["function"](self.__class, 123)) | 16 | print(self["for"], self.__class["function"](self.__class, 123)) |
| 15 | do | 17 | do |
| 16 | local fcolor = message:match("<%w*>") | 18 | local fcolor = message:match("<%w*>") |
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 @@ | |||
| 1 | local _u7ed1_u5b9a = _u6293_u53d6["绑定"]; | ||
| 2 | (_u7ed1_u5b9a(_u58f0_u660e))({ | ||
| 3 | ["颜色"] = "Red" | ||
| 4 | }) | ||
| 5 | local _u53d8_u91cfa = 'b' | ||
| 6 | local _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)) | ||
| 11 | local _u53d8_u91cfb | ||
| 12 | _u53d8_u91cfa, _u53d8_u91cfb = _u53d8_u91cfc, _u53d8_u91cfd; | ||
| 13 | (_u53d8_u91cfd(_u53d8_u91cfa))(_u53d8_u91cfc) | ||
| 14 | for _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) | ||
| 26 | end | ||
| 27 | do | ||
| 28 | _u6253_u5370(); | ||
| 29 | (a_u53d8_u91cf)(b_u53d8_u91cf(1)) | ||
| 30 | _u6253_u5370(); | ||
| 31 | (fn)(function() end) | ||
| 32 | end | ||
| 33 | do | ||
| 34 | _u6253_u5370() | ||
| 35 | _u5f02_u6b65_u51fd_u6570(function() | ||
| 36 | _u6253_u5370(); | ||
| 37 | --[[a comment to insert]] | ||
| 38 | (haha)() | ||
| 39 | return nil | ||
| 40 | end) | ||
| 41 | end | ||
| 42 | do | ||
| 43 | _u6253_u5370(123) | ||
| 44 | end | ||
| 45 | do | ||
| 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 | ||
| 113 | end | ||
| 114 | return 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 @@ | |||
| 1 | local __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 | ||
| 13 | end | ||
| 14 | local joop_u53d8_u91cf = 2345 | ||
| 15 | local _u53d8_u91cfa, _u53d8_u91cfb | ||
| 16 | if _u4f60_u597d then | ||
| 17 | _u53d8_u91cfa, _u53d8_u91cfb = "你好", nil | ||
| 18 | else | ||
| 19 | _u53d8_u91cfa, _u53d8_u91cfb = "没啥", "✌️" | ||
| 20 | end | ||
| 21 | if _u4f60_u597d then | ||
| 22 | if _u270c_ufe0f then | ||
| 23 | _u53d8_u91cfa, _u53d8_u91cfb = "一", "二" | ||
| 24 | else | ||
| 25 | _u53d8_u91cfa, _u53d8_u91cfb = "mmhh", nil | ||
| 26 | end | ||
| 27 | else | ||
| 28 | _u6253_u5370("其它东西") | ||
| 29 | _u53d8_u91cfa, _u53d8_u91cfb = "没啥事", "✌️" | ||
| 30 | end | ||
| 31 | local _u53d8_u91cfc, _u53d8_u91cfd | ||
| 32 | if true then | ||
| 33 | _u53d8_u91cfc, _u53d8_u91cfd = 1, 2 | ||
| 34 | end | ||
| 35 | local _u53d8_u91cfx | ||
| 36 | do | ||
| 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 | ||
| 44 | end | ||
| 45 | return __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 | ||
| 171 | end) | ||
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 @@ | |||
| 1 | local _u5e38_u91cfa <const>, _u5e38_u91cfb <const>, _u5e38_u91cfc <const>, _u5e38_u91cfd <const> = 1, 2, 3, 4 | ||
| 2 | do | ||
| 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) | ||
| 13 | end | ||
| 14 | do | ||
| 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 | ||
| 22 | end | ||
| 23 | do | ||
| 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 | ||
| 31 | end | ||
| 32 | do | ||
| 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)() | ||
| 47 | end | ||
| 48 | do | ||
| 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)() | ||
| 83 | end | ||
| 84 | do | ||
| 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 | }) | ||
| 100 | end | ||
| 101 | local __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4 = setmetatable({ }, { | ||
| 102 | __close = function(self) | ||
| 103 | self[#self]() | ||
| 104 | self[#self] = nil | ||
| 105 | end | ||
| 106 | }) | ||
| 107 | local _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 | ||
| 111 | end | ||
| 112 | do | ||
| 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) | ||
| 122 | end | ||
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 @@ | |||
| 1 | do | ||
| 2 | _u6620_u5c04({ | ||
| 3 | 1, | ||
| 4 | 2, | ||
| 5 | 3 | ||
| 6 | }, function(_u9879_u76ee) | ||
| 7 | return _u9879_u76ee * 2 | ||
| 8 | end) | ||
| 9 | end | ||
| 10 | do | ||
| 11 | _u6620_u5c04(function(_u9879_u76ee) | ||
| 12 | return _u9879_u76ee * 2 | ||
| 13 | end, { | ||
| 14 | 1, | ||
| 15 | 2, | ||
| 16 | 3 | ||
| 17 | }) | ||
| 18 | end | ||
| 19 | do | ||
| 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)()) | ||
| 32 | end | ||
| 33 | do | ||
| 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 | ||
| 50 | end | ||
| 51 | do | ||
| 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) | ||
| 67 | end | ||
| 68 | do | ||
| 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) | ||
| 83 | end | ||
| 84 | do | ||
| 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) | ||
| 113 | end | ||
| 114 | local _u5c5e_u6027A | ||
| 115 | do | ||
| 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) | ||
| 123 | end | ||
| 124 | local _u5c5e_u6027B | ||
| 125 | do | ||
| 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) | ||
| 133 | end | ||
| 134 | _u8b66_u544a("嗨") | ||
| 135 | local _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz | ||
| 136 | do | ||
| 137 | _u53d8_u91cfx = (_u53d8_u91cfa) < -_u53d8_u91cfb | ||
| 138 | end | ||
| 139 | do | ||
| 140 | _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz = _u53d8_u91cfb(function(_u53d8_u91cfa) end) | ||
| 141 | end | ||
| 142 | do | ||
| 143 | _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz = _u53d8_u91cfb(function(_u53d8_u91cfa) end) | ||
| 144 | end | ||
| 145 | do | ||
| 146 | _u53d8_u91cfx = _u53d8_u91cfa <= _u53d8_u91cfb | ||
| 147 | end | ||
| 148 | do | ||
| 149 | _u53d8_u91cfx, _u53d8_u91cfy, _u53d8_u91cfz = _u53d8_u91cfb(function(self, _u53d8_u91cfa) end) | ||
| 150 | end | ||
| 151 | return 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 @@ | |||
| 1 | local _u51fd_u6570 | ||
| 2 | _u51fd_u6570 = function(...) | ||
| 3 | return #{ | ||
| 4 | ... | ||
| 5 | } | ||
| 6 | end | ||
| 7 | local _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 | ||
| 18 | end | ||
| 19 | local _u53d8_u91cfk | ||
| 20 | do | ||
| 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 | ||
| 30 | end | ||
| 31 | local _u53d8_u91cfj | ||
| 32 | do | ||
| 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 | ||
| 42 | end | ||
| 43 | local _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 | ||
| 58 | end | ||
| 59 | local __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 | ||
| 123 | end | ||
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 @@ | |||
| 1 | local _u4f60_u597d | ||
| 2 | do | ||
| 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 | ||
| 33 | end | ||
| 34 | local _u5bf9_u8c61x = _u4f60_u597d(1, 2) | ||
| 35 | _u5bf9_u8c61x["你好"](_u5bf9_u8c61x) | ||
| 36 | _u6253_u5370(_u5bf9_u8c61x) | ||
| 37 | local _u7b80_u5355 | ||
| 38 | do | ||
| 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 | ||
| 62 | end | ||
| 63 | local _u4f0a_u514b_u65af | ||
| 64 | do | ||
| 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 | ||
| 107 | end | ||
| 108 | local x_u5bf9_u8c61 = _u4f0a_u514b_u65af() | ||
| 109 | x_u5bf9_u8c61["酷"](x_u5bf9_u8c61) | ||
| 110 | local _u55e8 | ||
| 111 | do | ||
| 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 | ||
| 137 | end | ||
| 138 | do | ||
| 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 | ||
| 185 | end | ||
| 186 | x_u5bf9_u8c61 = _u7b80_u5355() | ||
| 187 | x_u5bf9_u8c61["酷"](x_u5bf9_u8c61) | ||
| 188 | _u6253_u5370(x_u5bf9_u8c61.__class == _u7b80_u5355) | ||
| 189 | local _u597d_u5427 | ||
| 190 | do | ||
| 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 | ||
| 212 | end | ||
| 213 | local _u597d_u54d2 | ||
| 214 | do | ||
| 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 | ||
| 263 | end | ||
| 264 | local _u597d | ||
| 265 | do | ||
| 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 | ||
| 290 | end | ||
| 291 | local _u4ec0_u4e48 | ||
| 292 | do | ||
| 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 | ||
| 316 | end | ||
| 317 | do | ||
| 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 | ||
| 369 | end | ||
| 370 | do | ||
| 371 | local _with_0 = _u4f60_u597d() | ||
| 372 | _u5bf9_u8c61x = _with_0["一些对象"](_with_0) | ||
| 373 | _u6253_u5370(_u5bf9_u8c61x) | ||
| 374 | _u5bf9_u8c61x() | ||
| 375 | end | ||
| 376 | local _u8d85_u7ea7_u9177 | ||
| 377 | do | ||
| 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 | ||
| 415 | end | ||
| 416 | local _u53d8_u91cfx = self["你好"] | ||
| 417 | _u53d8_u91cfx = self.__class["你好"] | ||
| 418 | self["你好"](self, "世界") | ||
| 419 | self.__class["你好"](self.__class, "世界") | ||
| 420 | self.__class["一"](self.__class, self.__class["二"](self.__class, 4, 5)(self["三"], self["四"])) | ||
| 421 | local _u53d8_u91cfxx | ||
| 422 | _u53d8_u91cfxx = function(_u4f60_u597d, _u4e16_u754c, _u9177) | ||
| 423 | self["你好"] = _u4f60_u597d | ||
| 424 | self.__class["世界"] = _u4e16_u754c | ||
| 425 | end | ||
| 426 | local _u4e00_u4e2a_u7c7b | ||
| 427 | do | ||
| 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 | ||
| 455 | end | ||
| 456 | _u53d8_u91cfx = self | ||
| 457 | local _u53d8_u91cfy = self.__class | ||
| 458 | self(_u4e00_u4e9b_u4e1c_u897f) | ||
| 459 | self.__class(_u4e00_u4e9b_u4e1c_u897f) | ||
| 460 | local self = self + self / self | ||
| 461 | self = 343 | ||
| 462 | self["你好"](2, 3, 4) | ||
| 463 | local _ = _u4f60_u597d[self]["世界"] | ||
| 464 | local _u602a_u602a_u7684 | ||
| 465 | do | ||
| 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 | ||
| 495 | end | ||
| 496 | _u6253_u5370("你好") | ||
| 497 | local _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 | ||
| 524 | end | ||
| 525 | do | ||
| 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 | ||
| 547 | end | ||
| 548 | do | ||
| 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 | ||
| 570 | end | ||
| 571 | do | ||
| 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 | ||
| 618 | end | ||
| 619 | local _u7c7ba | ||
| 620 | do | ||
| 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 | ||
| 640 | end | ||
| 641 | local _u7c7bb | ||
| 642 | do | ||
| 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 | ||
| 663 | end | ||
| 664 | local _u7c7bc | ||
| 665 | do | ||
| 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 | ||
| 709 | end | ||
| 710 | local _u7c7bd | ||
| 711 | do | ||
| 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 | ||
| 754 | end | ||
| 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 | ||
| 779 | end)()).__name) | ||
| 780 | do | ||
| 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 | ||
| 802 | end | ||
| 803 | do | ||
| 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 | ||
| 829 | end | ||
| 830 | do | ||
| 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 | ||
| 850 | end | ||
| 851 | local _u9177 | ||
| 852 | do | ||
| 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 | ||
| 906 | end | ||
| 907 | local _u5947_u602a | ||
| 908 | do | ||
| 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 | ||
| 955 | end | ||
| 956 | local _u5594_u54c8 | ||
| 957 | do | ||
| 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 | ||
| 1025 | end | ||
| 1026 | do | ||
| 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) | ||
| 1061 | end | ||
| 1062 | do | ||
| 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) | ||
| 1096 | end | ||
| 1097 | do | ||
| 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 | ||
| 1146 | end | ||
| 1147 | local _u7c7bA | ||
| 1148 | do | ||
| 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 | ||
| 1185 | end | ||
| 1186 | local _u793a_u4f8b | ||
| 1187 | do | ||
| 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 | ||
| 1210 | end | ||
| 1211 | local _u968f_u4fbf | ||
| 1212 | do | ||
| 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 | ||
| 1241 | end | ||
| 1242 | return 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 @@ | |||
| 1 | local _u5217_u8868 = { | ||
| 2 | 1, | ||
| 3 | 2, | ||
| 4 | 3, | ||
| 5 | 4, | ||
| 6 | 5, | ||
| 7 | 6 | ||
| 8 | } | ||
| 9 | local _u8f93_u51fa | ||
| 10 | do | ||
| 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 | ||
| 16 | end | ||
| 17 | local _u5b57_u5178x = { | ||
| 18 | ["你好"] = "世界", | ||
| 19 | ["好吧"] = 2323 | ||
| 20 | } | ||
| 21 | local _u590d_u5236 | ||
| 22 | do | ||
| 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 | ||
| 30 | end | ||
| 31 | local __u65e0_u6548_u53d8_u91cf | ||
| 32 | do | ||
| 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 | ||
| 39 | end | ||
| 40 | do | ||
| 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 | ||
| 49 | end | ||
| 50 | do | ||
| 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 | ||
| 57 | end | ||
| 58 | do | ||
| 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 | ||
| 84 | end | ||
| 85 | local _u53d8_u91cf1 | ||
| 86 | do | ||
| 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 | ||
| 94 | end | ||
| 95 | local _u53d8_u91cf2 | ||
| 96 | do | ||
| 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 | ||
| 106 | end | ||
| 107 | local _u53d8_u91cfaa | ||
| 108 | do | ||
| 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 | ||
| 121 | end | ||
| 122 | local _u53d8_u91cfbb | ||
| 123 | do | ||
| 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 | ||
| 133 | end | ||
| 134 | local _u53d8_u91cfcc | ||
| 135 | do | ||
| 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 | ||
| 145 | end | ||
| 146 | local _u53d8_u91cfdd | ||
| 147 | do | ||
| 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 | ||
| 163 | end | ||
| 164 | do | ||
| 165 | local _tbl_0 = { } | ||
| 166 | for _u8ba1_u6570 = 1, 10 do | ||
| 167 | _tbl_0["你好"] = "世界" | ||
| 168 | end | ||
| 169 | __u65e0_u6548_u53d8_u91cf = _tbl_0 | ||
| 170 | end | ||
| 171 | local _u53d8_u91cfj | ||
| 172 | do | ||
| 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 | ||
| 181 | end | ||
| 182 | local _u53d8_u91cfk | ||
| 183 | do | ||
| 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 | ||
| 194 | end | ||
| 195 | local _u53d8_u91cfi | ||
| 196 | do | ||
| 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 | ||
| 207 | end | ||
| 208 | local _u53d8_u91cfhj | ||
| 209 | do | ||
| 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 | ||
| 216 | end | ||
| 217 | local _u53d8_u91cfhk | ||
| 218 | do | ||
| 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 | ||
| 227 | end | ||
| 228 | local _u53d8_u91cfhi | ||
| 229 | do | ||
| 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 | ||
| 238 | end | ||
| 239 | for _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) | ||
| 242 | end | ||
| 243 | do | ||
| 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 | ||
| 253 | end | ||
| 254 | do | ||
| 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 | ||
| 264 | end | ||
| 265 | do | ||
| 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 | ||
| 275 | end | ||
| 276 | return 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 @@ | |||
| 1 | local _u4f60_u5f88_u9177 = false | ||
| 2 | local __u65e0_u6548_u53d8_u91cf | ||
| 3 | if _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 | ||
| 14 | else | ||
| 15 | __u65e0_u6548_u53d8_u91cf = _u5426 | ||
| 16 | end | ||
| 17 | if _u9177 then | ||
| 18 | __u65e0_u6548_u53d8_u91cf = _u5426 | ||
| 19 | end | ||
| 20 | if _u9177 then | ||
| 21 | __u65e0_u6548_u53d8_u91cf = _u5426 | ||
| 22 | else | ||
| 23 | __u65e0_u6548_u53d8_u91cf = _u662f | ||
| 24 | end | ||
| 25 | if _u9177 then | ||
| 26 | _u5594(_u9177) | ||
| 27 | else | ||
| 28 | _u6ca1_u90a3_u4e48(_u9177) | ||
| 29 | end | ||
| 30 | if _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 | ||
| 40 | end | ||
| 41 | if _u270c_ufe0f then | ||
| 42 | _u65e0(_u65e5) | ||
| 43 | elseif _u9177(_u6211) then | ||
| 44 | _u597d_u5427(_u5440) | ||
| 45 | else | ||
| 46 | u_u578b(_u8def) | ||
| 47 | end | ||
| 48 | if _u270c_ufe0f then | ||
| 49 | _u65e0(_u7236) | ||
| 50 | else | ||
| 51 | if _u9177(_u4f60) then | ||
| 52 | _u597d_u5427(_u5427) | ||
| 53 | else | ||
| 54 | p_u578b(_u8def) | ||
| 55 | end | ||
| 56 | end | ||
| 57 | if (function() end)() then | ||
| 58 | _u968f_u4fbf(_u600e_u6837) | ||
| 59 | end | ||
| 60 | if nil then | ||
| 61 | _u7ffb_u8f6c(_u6211) | ||
| 62 | else | ||
| 63 | _u8fd9_u4e2a(_u662f, _u5f27_u5ea6) | ||
| 64 | end | ||
| 65 | if _u4e1c_u897f(_u4e0d_u9519) then | ||
| 66 | _u6ca1(_u6cd5) | ||
| 67 | elseif _u597d_u7684(_u786e_u5b9a) then | ||
| 68 | _u4ec0_u4e48(_u8fd9_u91cc) | ||
| 69 | end | ||
| 70 | if _u5f88_u591a_u4e1c_u897f then | ||
| 71 | _u6ca1(_u673a_u4f1a) | ||
| 72 | elseif _u597d_u5427 then | ||
| 73 | _u73b0_u5728(_u600e_u4e48_u529e) | ||
| 74 | end | ||
| 75 | if _u5f88_u591a_u4e1c_u897f then | ||
| 76 | _u662f(_u4f19_u8ba1) | ||
| 77 | elseif _u597d_u7684(_u4eba) then | ||
| 78 | _u55e8(_u597d_u5440) | ||
| 79 | else | ||
| 80 | _u55ef(_u786e_u5b9a) | ||
| 81 | end | ||
| 82 | if _u6211_u4eec(_u8d70_u5427) then | ||
| 83 | _u6253_u5370("打招呼") | ||
| 84 | elseif "只有我们" then | ||
| 85 | _u6253_u5370("威尔史密斯") | ||
| 86 | else | ||
| 87 | _u663e_u793a(5555555) | ||
| 88 | end | ||
| 89 | do | ||
| 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 | ||
| 96 | end | ||
| 97 | local _u4f60_u597d | ||
| 98 | do | ||
| 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 | ||
| 105 | end | ||
| 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 | ||
| 111 | end)() | ||
| 112 | local z_u53d8_u91cf = false | ||
| 113 | if false then | ||
| 114 | __u65e0_u6548_u53d8_u91cf = _u4e00 | ||
| 115 | else | ||
| 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 | ||
| 131 | end | ||
| 132 | local _u8f93_u51fa | ||
| 133 | if false then | ||
| 134 | _u8f93_u51fa = _u4e00 | ||
| 135 | else | ||
| 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 | ||
| 151 | end | ||
| 152 | local _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 | ||
| 167 | end | ||
| 168 | if not true then | ||
| 169 | _u6253_u5370("酷!") | ||
| 170 | end | ||
| 171 | if not (true and false) then | ||
| 172 | _u6253_u5370("酷!") | ||
| 173 | end | ||
| 174 | if not false then | ||
| 175 | _u6253_u5370("酷!") | ||
| 176 | end | ||
| 177 | if not false then | ||
| 178 | _u6253_u5370("酷!") | ||
| 179 | else | ||
| 180 | _u6253_u5370("no way!") | ||
| 181 | end | ||
| 182 | if not nil then | ||
| 183 | _u6253_u5370("hello") | ||
| 184 | else | ||
| 185 | _u6253_u5370("world") | ||
| 186 | end | ||
| 187 | local x | ||
| 188 | if not true then | ||
| 189 | x = _u6253_u5370("酷!") | ||
| 190 | end | ||
| 191 | if not (true and false) then | ||
| 192 | x = _u6253_u5370("酷!") | ||
| 193 | end | ||
| 194 | local y | ||
| 195 | if not false then | ||
| 196 | y = _u6253_u5370("酷!") | ||
| 197 | end | ||
| 198 | if not false then | ||
| 199 | y = _u6253_u5370("酷!") | ||
| 200 | else | ||
| 201 | y = _u6253_u5370("没门!") | ||
| 202 | end | ||
| 203 | local z | ||
| 204 | if not nil then | ||
| 205 | z = _u6253_u5370("你好") | ||
| 206 | else | ||
| 207 | z = _u6253_u5370("世界") | ||
| 208 | end | ||
| 209 | _u6253_u5370((function() | ||
| 210 | if not true then | ||
| 211 | return _u6253_u5370("酷!") | ||
| 212 | end | ||
| 213 | end)()) | ||
| 214 | _u6253_u5370((function() | ||
| 215 | if not (true and false) then | ||
| 216 | return _u6253_u5370("酷!") | ||
| 217 | end | ||
| 218 | end)()) | ||
| 219 | _u6253_u5370((function() | ||
| 220 | if not false then | ||
| 221 | return _u6253_u5370("酷!") | ||
| 222 | end | ||
| 223 | end)()) | ||
| 224 | _u6253_u5370((function() | ||
| 225 | if not false then | ||
| 226 | return _u6253_u5370("酷!") | ||
| 227 | else | ||
| 228 | return _u6253_u5370("没门!") | ||
| 229 | end | ||
| 230 | end)()) | ||
| 231 | _u6253_u5370((function() | ||
| 232 | if not nil then | ||
| 233 | return _u6253_u5370("你好") | ||
| 234 | else | ||
| 235 | return _u6253_u5370("世界") | ||
| 236 | end | ||
| 237 | end)()) | ||
| 238 | if not _u503c then | ||
| 239 | _u6253_u5370("你好") | ||
| 240 | end | ||
| 241 | local _u53d8_u91cfdddd | ||
| 242 | if not _u503c then | ||
| 243 | _u53d8_u91cfdddd = { | ||
| 244 | 1, | ||
| 245 | 2, | ||
| 246 | 3 | ||
| 247 | } | ||
| 248 | end | ||
| 249 | do | ||
| 250 | local j_u53d8_u91cf = 100 | ||
| 251 | j_u53d8_u91cf = _u55e8() | ||
| 252 | if not j_u53d8_u91cf then | ||
| 253 | _u9519_u8bef("不是 j变量!") | ||
| 254 | end | ||
| 255 | end | ||
| 256 | local _u53d8_u91cfa = 12 | ||
| 257 | local _u53d8_u91cfc, _u53d8_u91cfb | ||
| 258 | if _u67d0_u4e1c_u897f then | ||
| 259 | _u53d8_u91cfa, _u53d8_u91cfc, _u53d8_u91cfb = "酷", nil, nil | ||
| 260 | end | ||
| 261 | local _u53d8_u91cfj | ||
| 262 | if 1 then | ||
| 263 | if 2 then | ||
| 264 | _u53d8_u91cfj = 3 | ||
| 265 | end | ||
| 266 | else | ||
| 267 | _u53d8_u91cfj = 6 | ||
| 268 | end | ||
| 269 | local _u53d8_u91cfm | ||
| 270 | if 1 then | ||
| 271 | if 2 then | ||
| 272 | _u53d8_u91cfm = 3 | ||
| 273 | end | ||
| 274 | else | ||
| 275 | _u53d8_u91cfm = 6 | ||
| 276 | end | ||
| 277 | do | ||
| 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 | ||
| 296 | end | ||
| 297 | do | ||
| 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 | ||
| 306 | end | ||
| 307 | do | ||
| 308 | local _des_0 = _u6570_u5b66_u5e93 | ||
| 309 | if _des_0 then | ||
| 310 | local _u6d3e = _des_0["派"] | ||
| 311 | _u6253_u5370(_u6d3e) | ||
| 312 | end | ||
| 313 | end | ||
| 314 | do | ||
| 315 | local _u6570_u5b66_u5e93 | ||
| 316 | if _u6570_u5b66_u5e93 then | ||
| 317 | local _u6d3e = _u6570_u5b66_u5e93["派"] | ||
| 318 | _u6253_u5370(_u6d3e) | ||
| 319 | end | ||
| 320 | end | ||
| 321 | do | ||
| 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 | ||
| 329 | end | ||
| 330 | do | ||
| 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 | ||
| 343 | end | ||
| 344 | do | ||
| 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 | ||
| 353 | end | ||
| 354 | return 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 @@ | |||
| 1 | do | ||
| 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 | ||
| 17 | end | ||
| 18 | do | ||
| 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 | ||
| 70 | end | ||
| 71 | do | ||
| 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 | ||
| 89 | end | ||
| 90 | do | ||
| 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 | ||
| 96 | end | ||
| 97 | do | ||
| 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 | ||
| 103 | end | ||
| 104 | do | ||
| 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["世界"] | ||
| 111 | end | ||
| 112 | do | ||
| 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 | ||
| 128 | end | ||
| 129 | do | ||
| 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 | ||
| 135 | end | ||
| 136 | do | ||
| 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 | ||
| 163 | end | ||
| 164 | do | ||
| 165 | local _u53d8_u91cfz = "好" | ||
| 166 | local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _u53d8_u91cfz[1], _u53d8_u91cfz[2], _u53d8_u91cfz[3] | ||
| 167 | end | ||
| 168 | do | ||
| 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 | ||
| 174 | end | ||
| 175 | local _ | ||
| 176 | _ = function(_u53c2_u6570z) | ||
| 177 | local _u5143_u7d20a, _u5143_u7d20b, _u5143_u7d20c = _u53c2_u6570z[1], _u53c2_u6570z[2], _u53c2_u6570z[3] | ||
| 178 | end | ||
| 179 | do | ||
| 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 | ||
| 188 | end | ||
| 189 | do | ||
| 190 | local _u7ed3_u675f_u53d8_u91cf = _u4e1c_u897f["函数"]["结束"] | ||
| 191 | end | ||
| 192 | do | ||
| 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 | ||
| 198 | end | ||
| 199 | do | ||
| 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"] | ||
| 240 | end | ||
| 241 | do | ||
| 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 | ||
| 334 | end | ||
| 335 | do | ||
| 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 | ||
| 344 | end | ||
| 345 | do | ||
| 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 | ||
| 354 | end | ||
| 355 | do | ||
| 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 | ||
| 384 | end | ||
| 385 | do | ||
| 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 | ||
| 391 | end | ||
| 392 | do | ||
| 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 | ||
| 405 | end | ||
| 406 | do | ||
| 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 | ||
| 423 | end | ||
| 424 | do | ||
| 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 | ||
| 444 | end | ||
| 445 | do | ||
| 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 | ||
| 470 | end | ||
| 471 | do | ||
| 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 | ||
| 478 | end | ||
| 479 | do | ||
| 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 | ||
| 509 | end | ||
| 510 | do | ||
| 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 | ||
| 522 | end | ||
| 523 | do | ||
| 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 | ||
| 636 | end | ||
| 637 | return 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 @@ | |||
| 1 | do | ||
| 2 | _u6253_u5370("你好") | ||
| 3 | _u6253_u5370("世界") | ||
| 4 | end | ||
| 5 | local _u53d8_u91cfx | ||
| 6 | do | ||
| 7 | _u6253_u5370("你好") | ||
| 8 | _u53d8_u91cfx = _u6253_u5370("世界") | ||
| 9 | end | ||
| 10 | local _u53d8_u91cfy | ||
| 11 | do | ||
| 12 | local _u4e1c_u897f = "shhh" | ||
| 13 | _u53d8_u91cfy = function() | ||
| 14 | return "你好: " .. _u4e1c_u897f | ||
| 15 | end | ||
| 16 | end | ||
| 17 | local _ | ||
| 18 | _ = function() | ||
| 19 | if _u67d0_u6761_u4ef6 then | ||
| 20 | do | ||
| 21 | return "好的" | ||
| 22 | end | ||
| 23 | end | ||
| 24 | end | ||
| 25 | local _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 | } | ||
| 33 | return 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 | ||
| 48 | end | ||
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 @@ | |||
| 1 | do | ||
| 2 | local _obj_0 = _u51fd_u65701 | ||
| 3 | if _obj_0 ~= nil then | ||
| 4 | _obj_0() | ||
| 5 | end | ||
| 6 | end | ||
| 7 | do | ||
| 8 | local _obj_0 = _u51fd_u65702 | ||
| 9 | if _obj_0 ~= nil then | ||
| 10 | _obj_0("参数0", 123) | ||
| 11 | end | ||
| 12 | end | ||
| 13 | local _u53d8_u91cfx | ||
| 14 | do | ||
| 15 | local _obj_0 = _u8868 | ||
| 16 | if _obj_0 ~= nil then | ||
| 17 | _u53d8_u91cfx = _obj_0["值"] | ||
| 18 | end | ||
| 19 | end | ||
| 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 | ||
| 30 | end)()) | ||
| 31 | if _u6253_u5370 and (_u53d8_u91cfx ~= nil) then | ||
| 32 | _u6253_u5370(_u53d8_u91cfx) | ||
| 33 | end | ||
| 34 | do | ||
| 35 | local _obj_0 = self | ||
| 36 | if _obj_0 ~= nil then | ||
| 37 | _obj_0["函数"](_obj_0, 998) | ||
| 38 | end | ||
| 39 | end | ||
| 40 | do | ||
| 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 | ||
| 63 | end | ||
| 64 | do | ||
| 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 | ||
| 97 | end | ||
| 98 | local _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 | ||
| 111 | end)() ~= nil) | ||
| 112 | _u6253_u5370(_u7ed3_u679c) | ||
| 113 | local _u81ea_u6211_u4e3a_u4e2d_u5fc3 | ||
| 114 | if (_u601d_u60f3 ~= nil) and not (_u4e16_u754c ~= nil) then | ||
| 115 | _u81ea_u6211_u4e3a_u4e2d_u5fc3 = true | ||
| 116 | end | ||
| 117 | local _u901f_u5ea6 = 0 | ||
| 118 | _u901f_u5ea6 = _u901f_u5ea6 or 15 | ||
| 119 | local _u811a_u5370 = _u91ce_u4eba or "熊" | ||
| 120 | local _u4e13_u4e1a = '计算机科学' | ||
| 121 | if not (_u4e13_u4e1a ~= nil) then | ||
| 122 | _u9009_u4fee_u8bfe_u7a0b('葡萄酒入门') | ||
| 123 | end | ||
| 124 | if (_u7a97_u4f53 ~= nil) then | ||
| 125 | local _u73af_u5883 = '浏览器(有可能)' | ||
| 126 | end | ||
| 127 | local _u90ae_u7f16 | ||
| 128 | do | ||
| 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 | ||
| 138 | end | ||
| 139 | local _u957f_u5ea6 = (function() | ||
| 140 | local _obj_0 = utf8 | ||
| 141 | if _obj_0 ~= nil then | ||
| 142 | return _obj_0["长度"] | ||
| 143 | end | ||
| 144 | return nil | ||
| 145 | end)() or (function() | ||
| 146 | local _obj_0 = _u5b57_u7b26_u4e32 | ||
| 147 | if _obj_0 ~= nil then | ||
| 148 | return _obj_0["长度"] | ||
| 149 | end | ||
| 150 | return nil | ||
| 151 | end)() or function(_u5bf9_u8c61) | ||
| 152 | return #_u5bf9_u8c61 | ||
| 153 | end | ||
| 154 | local _u53d8_u91cfa | ||
| 155 | do | ||
| 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 | ||
| 171 | end | ||
| 172 | local _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 | ||
| 182 | end)() ~= 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 | ||
| 192 | end)() | ||
| 193 | do | ||
| 194 | local _with_0 = io.open("测试.txt", "w") | ||
| 195 | if _with_0 ~= nil then | ||
| 196 | _with_0:write("你好") | ||
| 197 | _with_0:close() | ||
| 198 | end | ||
| 199 | end | ||
| 200 | do | ||
| 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 | ||
| 210 | end | ||
| 211 | do | ||
| 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 | ||
| 222 | end | ||
| 223 | return 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 @@ | |||
| 1 | local _module_0 = setmetatable({ }, { }) | ||
| 2 | local _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 | ||
| 4 | local _u9177 = "🧧" | ||
| 5 | _module_0["酷"] = _u9177 | ||
| 6 | local _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 | ||
| 10 | local _u67d0_u7c7b | ||
| 11 | do | ||
| 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 | ||
| 33 | end | ||
| 34 | _module_0["_u67d0_u7c7b"] = _u67d0_u7c7b | ||
| 35 | if _u8fd9_u4e2a then | ||
| 36 | _module_0[#_module_0 + 1] = 232 | ||
| 37 | else | ||
| 38 | _module_0[#_module_0 + 1] = 4343 | ||
| 39 | end | ||
| 40 | local _u4ec0_u4e48 | ||
| 41 | if _u8fd9_u4e2a then | ||
| 42 | _u4ec0_u4e48 = 232 | ||
| 43 | else | ||
| 44 | _u4ec0_u4e48 = 4343 | ||
| 45 | end | ||
| 46 | _module_0["什么"] = _u4ec0_u4e48 | ||
| 47 | local _u53d8_u91cfy | ||
| 48 | _u53d8_u91cfy = function() | ||
| 49 | local _u4f60_u597d = 3434 | ||
| 50 | end | ||
| 51 | _module_0["变量y"] = _u53d8_u91cfy | ||
| 52 | do | ||
| 53 | local _with_0 = _u4e34_u65f6 | ||
| 54 | local _u53d8_u91cfj = 2000 | ||
| 55 | _module_0[#_module_0 + 1] = _with_0 | ||
| 56 | end | ||
| 57 | local cb_u7684_u503c | ||
| 58 | do | ||
| 59 | local _u53d8_u91cfh = 100 | ||
| 60 | cb_u7684_u503c = _u51fd_u6570(function(_u53c2_u6570) | ||
| 61 | return _u53c2_u6570(h_u53d8_u91cf) | ||
| 62 | end) | ||
| 63 | end | ||
| 64 | _module_0["cb的值"] = cb_u7684_u503c | ||
| 65 | local _u4e2b_u4e2b | ||
| 66 | _u4e2b_u4e2b = function() | ||
| 67 | local _u53d8_u91cfh = 100 | ||
| 68 | local _u53d8_u91cfk = 100 | ||
| 69 | end | ||
| 70 | _module_0["丫丫"] = _u4e2b_u4e2b | ||
| 71 | do | ||
| 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 | ||
| 80 | end | ||
| 81 | local _u5e38_u91cf | ||
| 82 | do | ||
| 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 | ||
| 91 | end | ||
| 92 | _module_0["常量"] = _u5e38_u91cf | ||
| 93 | local _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 | ||
| 100 | end)()) | ||
| 101 | _u51fd_u6570((function() | ||
| 102 | return 123 | ||
| 103 | end)()) | ||
| 104 | _u51fd_u6570((function() | ||
| 105 | local _exp_0 = _u5bf9_u8c61a | ||
| 106 | if _u53d8_u91cfb == _exp_0 then | ||
| 107 | return _u503cc | ||
| 108 | end | ||
| 109 | end)()) | ||
| 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 | ||
| 118 | end)()) | ||
| 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 | ||
| 127 | end)()) | ||
| 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 | ||
| 134 | end)()) | ||
| 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 | ||
| 146 | end)()) | ||
| 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 | ||
| 155 | end)()) | ||
| 156 | _u51fd_u6570((function() | ||
| 157 | local _with_0 = _u6761_u4ef6a | ||
| 158 | _with_0["字段b"] = 123 | ||
| 159 | return _with_0 | ||
| 160 | end)()) | ||
| 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 | ||
| 167 | end)()) | ||
| 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 | ||
| 174 | end)()) | ||
| 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 | ||
| 199 | end)()) | ||
| 200 | local _ = tostring((function() | ||
| 201 | if _u6761_u4ef6a then | ||
| 202 | return _u503cb | ||
| 203 | end | ||
| 204 | end)()) | ||
| 205 | _ = tostring((function() | ||
| 206 | return 123 | ||
| 207 | end)()) | ||
| 208 | _ = tostring((function() | ||
| 209 | local _exp_0 = _u5bf9_u8c61a | ||
| 210 | if _u53d8_u91cfb == _exp_0 then | ||
| 211 | return _u503cc | ||
| 212 | end | ||
| 213 | end)()) | ||
| 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 | ||
| 222 | end)()) | ||
| 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 | ||
| 231 | end)()) | ||
| 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 | ||
| 238 | end)()) | ||
| 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 | ||
| 250 | end)()) | ||
| 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 | ||
| 259 | end)()) | ||
| 260 | _ = tostring((function() | ||
| 261 | local _with_0 = _u5bf9_u8c61a | ||
| 262 | _with_0["字段b"] = 123 | ||
| 263 | return _with_0 | ||
| 264 | end)()) | ||
| 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 | ||
| 271 | end)()) | ||
| 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 | ||
| 278 | end)()) | ||
| 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 | ||
| 303 | end)()) | ||
| 304 | local _u53d8_u91cf1, _u53d8_u91cf2, _u53d8_u91cf3, _u7c7b4, _u53d8_u91cf5 | ||
| 305 | _u53d8_u91cf1 = 1 | ||
| 306 | _u53d8_u91cf2 = 2 | ||
| 307 | _module_0["变量2"] = _u53d8_u91cf2 | ||
| 308 | do | ||
| 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 | ||
| 329 | end | ||
| 330 | _module_0["变量3"] = _u53d8_u91cf3 | ||
| 331 | _u53d8_u91cf5 = 5 | ||
| 332 | getmetatable(_module_0)["🀄️"] = 1 | ||
| 333 | getmetatable(_module_0).__name = "导出" | ||
| 334 | getmetatable(_module_0).__call = function(self) | ||
| 335 | return { } | ||
| 336 | end | ||
| 337 | _module_0["导出-任意-名称"] = 123 | ||
| 338 | return _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 @@ | |||
| 1 | local _module_0 = nil | ||
| 2 | _u6253_u5370("没问题") | ||
| 3 | _module_0 = function() | ||
| 4 | _u6253_u5370("你好") | ||
| 5 | return 123 | ||
| 6 | end | ||
| 7 | if 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) | ||
| 18 | end | ||
| 19 | return _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 @@ | |||
| 1 | local _u53d8_u91cfx | ||
| 2 | _u53d8_u91cfx = function() | ||
| 3 | return _u6253_u5370(_u4ec0_u4e48) | ||
| 4 | end | ||
| 5 | local __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 | ||
| 11 | end | ||
| 12 | _u5230(_u8c37(_u4ed3(_u53bb))) | ||
| 13 | _u5f00(function() | ||
| 14 | return _u8fd9_u6247(function() | ||
| 15 | return _u95e8 | ||
| 16 | end) | ||
| 17 | end) | ||
| 18 | _u5f00(function() | ||
| 19 | _u8fd9_u6247(_u95e8) | ||
| 20 | local _u4f60_u597d | ||
| 21 | _u4f60_u597d = function() | ||
| 22 | return _u6211_u7684(_u51fd_u6570) | ||
| 23 | end | ||
| 24 | end) | ||
| 25 | local _u53d8_u91cfh | ||
| 26 | _u53d8_u91cfh = function() | ||
| 27 | return _ud83d_udc4b | ||
| 28 | end | ||
| 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) | ||
| 40 | end | ||
| 41 | __u65e0_u6548_u53d8_u91cf = function(_u53c2_u6570x) | ||
| 42 | if _u53c2_u6570x == nil then | ||
| 43 | _u53c2_u6570x = 23023 | ||
| 44 | end | ||
| 45 | end | ||
| 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 | ||
| 54 | end | ||
| 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 | ||
| 63 | end | ||
| 64 | local _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) | ||
| 78 | end | ||
| 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 | ||
| 84 | end | ||
| 85 | __u65e0_u6548_u53d8_u91cf = function(self, _u53c2_u6570x) | ||
| 86 | if _u53c2_u6570x == nil then | ||
| 87 | _u53c2_u6570x = 1 | ||
| 88 | end | ||
| 89 | end | ||
| 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 | ||
| 99 | end | ||
| 100 | _u53d8_u91cfx(function() | ||
| 101 | return | ||
| 102 | end) | ||
| 103 | _u53d8_u91cfy(function() | ||
| 104 | return 1 | ||
| 105 | end) | ||
| 106 | _u53d8_u91cfz(function() | ||
| 107 | return 1, "你好", "世界" | ||
| 108 | end) | ||
| 109 | _u53d8_u91cfk(function() | ||
| 110 | if _u662f then | ||
| 111 | return | ||
| 112 | else | ||
| 113 | return | ||
| 114 | end | ||
| 115 | end) | ||
| 116 | __u65e0_u6548_u53d8_u91cf = function() | ||
| 117 | if _u67d0_u7269 then | ||
| 118 | return _u771f_u540d | ||
| 119 | end | ||
| 120 | end | ||
| 121 | _u51fd_u6570d(function() | ||
| 122 | return _u6253_u5370("你好 世界") | ||
| 123 | end, 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 | ||
| 129 | end)(), 10, 20) | ||
| 130 | _u51fd_u6570f()()(_u4ec0_u4e48)(function() | ||
| 131 | return _u6253_u5370("srue") | ||
| 132 | end, 123) | ||
| 133 | _u53d8_u91cfx = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 134 | return _u6253_u5370("什么") | ||
| 135 | end | ||
| 136 | local _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("什么") | ||
| 145 | end | ||
| 146 | local _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("什么") | ||
| 155 | end | ||
| 156 | local _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("什么") | ||
| 165 | end | ||
| 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("什么") | ||
| 174 | end | ||
| 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("什么") | ||
| 183 | end | ||
| 184 | local _u591a_u53c2_u6570 | ||
| 185 | _u591a_u53c2_u6570 = function(_u53c2_u6570a, _u53c2_u6570b) | ||
| 186 | return _u6253_u5370("什么") | ||
| 187 | end | ||
| 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("什么") | ||
| 196 | end | ||
| 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("什么") | ||
| 205 | end | ||
| 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("什么") | ||
| 214 | end | ||
| 215 | local self | ||
| 216 | self = function(_u53c2_u6570n) | ||
| 217 | if _u53c2_u6570n == 0 then | ||
| 218 | return 1 | ||
| 219 | end | ||
| 220 | return _u53c2_u6570n * self(_u53c2_u6570n - 1) | ||
| 221 | end | ||
| 222 | return 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 @@ | |||
| 1 | do | ||
| 2 | _u5168_u5c40_u53d8_u91cfa, _u5168_u5c40_u53d8_u91cfb, _u5168_u5c40_u53d8_u91cfc = 223, 343, nil | ||
| 3 | _u9177 = "📉" | ||
| 4 | end | ||
| 5 | do | ||
| 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 | ||
| 29 | end | ||
| 30 | do | ||
| 31 | local _u53d8_u91cfc, _u53d8_u91cfd | ||
| 32 | _u5168_u5c40_u53d8_u91cfa, _u5168_u5c40_u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd = "你好", nil, nil, nil | ||
| 33 | end | ||
| 34 | do | ||
| 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 | ||
| 51 | end | ||
| 52 | do | ||
| 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 | ||
| 66 | end | ||
| 67 | do | ||
| 68 | _u53d8_u91cfx = 3434 | ||
| 69 | if _u6761_u4ef6y then | ||
| 70 | _u53d8_u91cfx = 10 | ||
| 71 | end | ||
| 72 | end | ||
| 73 | do | ||
| 74 | if _u6761_u4ef6y then | ||
| 75 | local _u53d8_u91cfx = 10 | ||
| 76 | end | ||
| 77 | _u53d8_u91cfx = 3434 | ||
| 78 | end | ||
| 79 | do | ||
| 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 | ||
| 91 | end | ||
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 @@ | |||
| 1 | do | ||
| 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:: | ||
| 10 | end | ||
| 11 | do | ||
| 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:: | ||
| 23 | end | ||
| 24 | do | ||
| 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 | ||
| 37 | end | ||
| 38 | do | ||
| 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:: | ||
| 55 | end | ||
| 56 | do | ||
| 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:: | ||
| 67 | end | ||
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 @@ | |||
| 1 | local _u4f60_u597d = _u597d_u7684["你好"] | ||
| 2 | local _u597d_u5440, _u4e16_u754c | ||
| 3 | do | ||
| 4 | local _obj_0 = _u8868["酷"] | ||
| 5 | _u597d_u5440, _u4e16_u754c = _obj_0["好呀"], _obj_0["世界"] | ||
| 6 | end | ||
| 7 | local _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 | ||
| 13 | end)(), _u9053_u5177_u7ec4["字段z"] | ||
| 14 | local _u9886_u4e3b, _ud83d_udc7b | ||
| 15 | do | ||
| 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)() | ||
| 24 | end | ||
| 25 | local _obj_0 = 232 | ||
| 26 | local _u67d0_u7269 | ||
| 27 | do | ||
| 28 | local _obj_1 = _u4e00_u4e2a(_u8868_u683c) | ||
| 29 | _u67d0_u7269 = _obj_1["某物"] | ||
| 30 | end | ||
| 31 | if _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 | ||
| 43 | end | ||
| 44 | do | ||
| 45 | local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"] | ||
| 46 | end | ||
| 47 | do | ||
| 48 | local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"] | ||
| 49 | end | ||
| 50 | do | ||
| 51 | local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"] | ||
| 52 | end | ||
| 53 | do | ||
| 54 | local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"] | ||
| 55 | end | ||
| 56 | do | ||
| 57 | local _u5b57_u6bb5a, _u5b57_u6bb5b, _u5b57_u6bb5c = _u5bf9_u8c61z["字段a"], _u5bf9_u8c61z["字段b"], _u5bf9_u8c61z["字段c"] | ||
| 58 | end | ||
| 59 | do | ||
| 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) | ||
| 68 | end | ||
| 69 | do | ||
| 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) | ||
| 83 | end | ||
| 84 | do | ||
| 85 | _u6a21_u5757 = require('模块') | ||
| 86 | _u6a21_u5757_x = require('模块_x') | ||
| 87 | _u6a21_u5757_y = require("组织.包.模块-y") | ||
| 88 | _u6253_u5370(_u6a21_u5757_y) | ||
| 89 | end | ||
| 90 | do | ||
| 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 | ||
| 96 | end | ||
| 97 | do | ||
| 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 | ||
| 112 | end | ||
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 | ||
| 4 | end)()) | ||
| 5 | local _u53d8_u91cfa, _u53d8_u91cfb = (function(...) | ||
| 6 | local _val_0 = _u51fd_u6570x(...) | ||
| 7 | return not (1 <= _val_0 and _val_0 <= 3) | ||
| 8 | end)(...), 2 | ||
| 9 | local _u53d8_u91cfd | ||
| 10 | do | ||
| 11 | local _val_0 = (_u5bf9_u8c61["字段x"]["字段y"](...)) | ||
| 12 | _u53d8_u91cfd = not (1 <= _val_0 and _val_0 <= 3) | ||
| 13 | end | ||
| 14 | local _u5728_u7684 | ||
| 15 | do | ||
| 16 | local _val_0 = "东" | ||
| 17 | _u5728_u7684 = "东" == _val_0 or "西" == _val_0 | ||
| 18 | end | ||
| 19 | if (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 | ||
| 22 | end)() then | ||
| 23 | _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc) | ||
| 24 | end | ||
| 25 | do | ||
| 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 | ||
| 36 | end | ||
| 37 | do | ||
| 38 | local _val_0 = _u53d8_u91cfy | ||
| 39 | return not (_u5f00_u59cb < _val_0 and _val_0 < _u7ed3_u675f) | ||
| 40 | end | ||
| 41 | do | ||
| 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)()) | ||
| 66 | end | ||
| 67 | do | ||
| 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)()) | ||
| 93 | end | ||
| 94 | do | ||
| 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)(...)) | ||
| 141 | end | ||
| 142 | do | ||
| 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) | ||
| 180 | end | ||
| 181 | return 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 @@ | |||
| 1 | local _u4f60_u597d | ||
| 2 | do | ||
| 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 | ||
| 15 | end | ||
| 16 | local _u7269_u54c1 = { | ||
| 17 | 1, | ||
| 18 | 2, | ||
| 19 | 3, | ||
| 20 | 4, | ||
| 21 | 5, | ||
| 22 | 6 | ||
| 23 | } | ||
| 24 | local _ | ||
| 25 | do | ||
| 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 | ||
| 35 | end | ||
| 36 | local _u534a_u5f84 | ||
| 37 | do | ||
| 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 | ||
| 56 | end | ||
| 57 | do | ||
| 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 | ||
| 69 | end | ||
| 70 | require("实用") | ||
| 71 | local _u503e_u5012 | ||
| 72 | _u503e_u5012 = function(_u53d8_u91cfx) | ||
| 73 | return _u6253_u5370(_u5b9e_u7528["倾倒"](_u53d8_u91cfx)) | ||
| 74 | end | ||
| 75 | local _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) | ||
| 84 | end | ||
| 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 | ||
| 93 | end)()) | ||
| 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 | ||
| 109 | end)()) | ||
| 110 | local _u4e1c_u897f | ||
| 111 | do | ||
| 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 | ||
| 125 | end | ||
| 126 | for _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 | ||
| 140 | end | ||
| 141 | for _u53d8_u91cfx in _u7269_u54c1 do | ||
| 142 | _u6253_u5370("你好", _u53d8_u91cfx) | ||
| 143 | end | ||
| 144 | do | ||
| 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 | ||
| 152 | end | ||
| 153 | local _u53d8_u91cfx | ||
| 154 | do | ||
| 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 | ||
| 162 | end | ||
| 163 | for _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 | ||
| 177 | end | ||
| 178 | local _u53cc_u500d | ||
| 179 | do | ||
| 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 | ||
| 188 | end | ||
| 189 | for _index_0 = 1, #_u53cc_u500d do | ||
| 190 | local _u53d8_u91cfx = _u53cc_u500d[_index_0] | ||
| 191 | _u6253_u5370(_u53d8_u91cfx) | ||
| 192 | end | ||
| 193 | local _u5207 | ||
| 194 | do | ||
| 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 | ||
| 205 | end | ||
| 206 | do | ||
| 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 | ||
| 218 | end | ||
| 219 | for _index_0 = 1, #_u4f60_u597d do | ||
| 220 | local _u53d8_u91cfz = _u4f60_u597d[_index_0] | ||
| 221 | _u6253_u5370(_u53d8_u91cfz) | ||
| 222 | end | ||
| 223 | _u53d8_u91cfx = { | ||
| 224 | 1, | ||
| 225 | 2, | ||
| 226 | 3, | ||
| 227 | 4, | ||
| 228 | 5, | ||
| 229 | 6, | ||
| 230 | 7 | ||
| 231 | } | ||
| 232 | local _max_0 = -5 | ||
| 233 | for _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) | ||
| 236 | end | ||
| 237 | local _max_1 = 3 | ||
| 238 | for _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) | ||
| 241 | end | ||
| 242 | for _index_0 = 2, #_u53d8_u91cfx do | ||
| 243 | local _u53d8_u91cfy = _u53d8_u91cfx[_index_0] | ||
| 244 | _u6253_u5370(_u53d8_u91cfy) | ||
| 245 | end | ||
| 246 | for _index_0 = 1, #_u53d8_u91cfx, 2 do | ||
| 247 | local _u53d8_u91cfy = _u53d8_u91cfx[_index_0] | ||
| 248 | _u6253_u5370(_u53d8_u91cfy) | ||
| 249 | end | ||
| 250 | for _index_0 = 2, #_u53d8_u91cfx, 2 do | ||
| 251 | local _u53d8_u91cfy = _u53d8_u91cfx[_index_0] | ||
| 252 | _u6253_u5370(_u53d8_u91cfy) | ||
| 253 | end | ||
| 254 | local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = 1, 5, 2 | ||
| 255 | local _max_2 = _u53d8_u91cfb | ||
| 256 | for _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) | ||
| 259 | end | ||
| 260 | local _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 | ||
| 269 | end | ||
| 270 | local _u6d4b_u8bd5 = _u53d8_u91cfx(1, 2, 3, 4, 5) | ||
| 271 | for _index_0 = 1, #_u6d4b_u8bd5 do | ||
| 272 | local _u4e8b_u60c5 = _u6d4b_u8bd5[_index_0] | ||
| 273 | _u6253_u5370(_u4e8b_u60c5) | ||
| 274 | end | ||
| 275 | return 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 | ||
| 281 | end | ||
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 @@ | |||
| 1 | local _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 | } | ||
| 36 | return _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 @@ | |||
| 1 | do | ||
| 2 | local _u53d8_u91cfa | ||
| 3 | local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc | ||
| 4 | local _u53d8_u91cfg | ||
| 5 | _u53d8_u91cfb, _u53d8_u91cfg = 23232, nil | ||
| 6 | end | ||
| 7 | do | ||
| 8 | local _u53d8_u91cfx = 1212 | ||
| 9 | local _u67d0_u4e8b | ||
| 10 | _u67d0_u4e8b = function() | ||
| 11 | local _u53d8_u91cfx | ||
| 12 | _u53d8_u91cfx = 1212 | ||
| 13 | end | ||
| 14 | end | ||
| 15 | do | ||
| 16 | local _u53d8_u91cfy, _u53d8_u91cfz | ||
| 17 | _u53d8_u91cfy = 2323 | ||
| 18 | _u53d8_u91cfz = 2323 | ||
| 19 | end | ||
| 20 | do | ||
| 21 | _u6253_u5370("啥也没有!") | ||
| 22 | end | ||
| 23 | do | ||
| 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 = "好" | ||
| 29 | end | ||
| 30 | do | ||
| 31 | local x_u53d8_u91cf, y_u53d8_u91cf = "a", "b" | ||
| 32 | end | ||
| 33 | do | ||
| 34 | local x_u53d8_u91cf, y_u53d8_u91cf | ||
| 35 | x_u53d8_u91cf, y_u53d8_u91cf = "a", "b" | ||
| 36 | end | ||
| 37 | do | ||
| 38 | if _u67d0_u4e8b then | ||
| 39 | local x_u53d8_u91cf = 2323 | ||
| 40 | end | ||
| 41 | end | ||
| 42 | do | ||
| 43 | local _u53d8_u91cfx | ||
| 44 | do | ||
| 45 | _u53d8_u91cfx = "一" | ||
| 46 | end | ||
| 47 | _u53d8_u91cfx = 100 | ||
| 48 | do | ||
| 49 | _u53d8_u91cfx = "二" | ||
| 50 | end | ||
| 51 | end | ||
| 52 | do | ||
| 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 | ||
| 62 | end | ||
| 63 | do | ||
| 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 | ||
| 72 | end | ||
| 73 | do | ||
| 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 | ||
| 145 | end | ||
| 146 | do | ||
| 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 | ||
| 152 | end | ||
| 153 | do | ||
| 154 | local _u53d8_u91cfx | ||
| 155 | _u53d8_u91cfx = _u53d8_u91cfa or _u53d8_u91cfb | ||
| 156 | end | ||
| 157 | local _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 @@ | |||
| 1 | for _u53d8_u91cfx = 1, 10 do | ||
| 2 | _u6253_u5370("yeah") | ||
| 3 | end | ||
| 4 | for _u53d8_u91cfx = 1, #_u67d0_u7269 do | ||
| 5 | _u6253_u5370("yeah") | ||
| 6 | end | ||
| 7 | for _u53d8_u91cfy = 100, 60, -3 do | ||
| 8 | _u6253_u5370("倒计时", _u53d8_u91cfy) | ||
| 9 | end | ||
| 10 | for _u53d8_u91cfa = 1, 10 do | ||
| 11 | _u6253_u5370("好的") | ||
| 12 | end | ||
| 13 | for _u53d8_u91cfa = 1, 10 do | ||
| 14 | for _u53d8_u91cfb = 2, 43 do | ||
| 15 | _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb) | ||
| 16 | end | ||
| 17 | end | ||
| 18 | for _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 | ||
| 23 | end | ||
| 24 | local _list_0 = _u67d0_u7269 | ||
| 25 | for _index_0 = 1, #_list_0 do | ||
| 26 | local _u53d8_u91cfx = _list_0[_index_0] | ||
| 27 | _u6253_u5370(_u53d8_u91cfx) | ||
| 28 | end | ||
| 29 | for _u952e, _u503c in pairs(_u4f60_u597d) do | ||
| 30 | _u6253_u5370(_u952e, _u503c) | ||
| 31 | end | ||
| 32 | for _u53d8_u91cfx in _u53d8_u91cfy, _u53d8_u91cfz do | ||
| 33 | _u6253_u5370(_u53d8_u91cfx) | ||
| 34 | end | ||
| 35 | for _u53d8_u91cfx in _u53d8_u91cfy, _u53d8_u91cfz, _u952e do | ||
| 36 | _u6253_u5370(_u53d8_u91cfx) | ||
| 37 | end | ||
| 38 | local _list_1 = _u6a21_u5757 | ||
| 39 | for _index_0 = 1, #_list_1 do | ||
| 40 | local _u540d_u79f0, _u6210_u5458_u4eec = _list_1[_index_0] | ||
| 41 | _u6253_u5370(_u540d_u79f0, _u6210_u5458) | ||
| 42 | end | ||
| 43 | local _u53d8_u91cfx | ||
| 44 | _u53d8_u91cfx = function() | ||
| 45 | for _u53d8_u91cfx in _u53d8_u91cfy do | ||
| 46 | local _u53d8_u91cf_ = _u53d8_u91cfy | ||
| 47 | end | ||
| 48 | end | ||
| 49 | local _u4f60_u597d = { | ||
| 50 | 1, | ||
| 51 | 2, | ||
| 52 | 3, | ||
| 53 | 4, | ||
| 54 | 5 | ||
| 55 | } | ||
| 56 | do | ||
| 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 | ||
| 67 | end | ||
| 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 | ||
| 73 | end | ||
| 74 | local _u8868_u683c | ||
| 75 | do | ||
| 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 | ||
| 83 | end | ||
| 84 | local _u54e6 = 0 | ||
| 85 | local _u53d8_u91cfy | ||
| 86 | do | ||
| 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 | ||
| 95 | end | ||
| 96 | local _u53d8_u91cf_ | ||
| 97 | _u53d8_u91cf_ = function() | ||
| 98 | for _u53d8_u91cfk = 10, 40 do | ||
| 99 | _u53d8_u91cf_ = "好的" | ||
| 100 | end | ||
| 101 | end | ||
| 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 | ||
| 110 | end | ||
| 111 | while true do | ||
| 112 | _u6253_u5370("名称") | ||
| 113 | end | ||
| 114 | while 5 + 5 do | ||
| 115 | _u6253_u5370("好的 世界") | ||
| 116 | _u5de5_u4f5c(_u4eba) | ||
| 117 | end | ||
| 118 | while _u8fd8_u6709 do | ||
| 119 | _u6211(_u4e5f(_u5de5_u4f5c)) | ||
| 120 | _u53d8_u91cf_ = "好的" | ||
| 121 | end | ||
| 122 | local _u53d8_u91cfi = 0 | ||
| 123 | do | ||
| 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 | ||
| 132 | end | ||
| 133 | do | ||
| 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 | ||
| 144 | end | ||
| 145 | do | ||
| 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 | ||
| 154 | end | ||
| 155 | while 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:: | ||
| 165 | end | ||
| 166 | for _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 | ||
| 174 | end | ||
| 175 | local _u53d8_u91cfa = 1 | ||
| 176 | repeat | ||
| 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:: | ||
| 186 | until _u53d8_u91cfa == 10 | ||
| 187 | _u53d8_u91cfx = 0 | ||
| 188 | repeat | ||
| 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:: | ||
| 196 | until _u53d8_u91cfy == 10 | ||
| 197 | _u53d8_u91cfa = 3 | ||
| 198 | while not (_u53d8_u91cfa == 0) do | ||
| 199 | _u53d8_u91cfa = _u53d8_u91cfa - 1 | ||
| 200 | end | ||
| 201 | local _u5b8c_u6210 = false | ||
| 202 | while not _u5b8c_u6210 do | ||
| 203 | _u5b8c_u6210 = true | ||
| 204 | end | ||
| 205 | repeat | ||
| 206 | _u6253_u5370("你好") | ||
| 207 | until true | ||
| 208 | while not _u5b8c_u6210 do | ||
| 209 | _u53d8_u91cfx = 10 | ||
| 210 | repeat | ||
| 211 | _u53d8_u91cfx = _u53d8_u91cfx - 1 | ||
| 212 | until _u53d8_u91cfx == 0 | ||
| 213 | end | ||
| 214 | while not _u6761_u4ef6 do | ||
| 215 | _u6253_u5370("好的") | ||
| 216 | end | ||
| 217 | for _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:: | ||
| 223 | end | ||
| 224 | local _u5217_u8868 | ||
| 225 | do | ||
| 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 | ||
| 237 | end | ||
| 238 | local _list_2 = { | ||
| 239 | 1, | ||
| 240 | 2, | ||
| 241 | 3, | ||
| 242 | 4, | ||
| 243 | 5, | ||
| 244 | 6 | ||
| 245 | } | ||
| 246 | for _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:: | ||
| 256 | end | ||
| 257 | for _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:: | ||
| 268 | end | ||
| 269 | while true do | ||
| 270 | if false then | ||
| 271 | goto _continue_9 | ||
| 272 | end | ||
| 273 | break | ||
| 274 | ::_continue_9:: | ||
| 275 | end | ||
| 276 | while true do | ||
| 277 | if false then | ||
| 278 | goto _continue_10 | ||
| 279 | end | ||
| 280 | do | ||
| 281 | return 22 | ||
| 282 | end | ||
| 283 | ::_continue_10:: | ||
| 284 | end | ||
| 285 | do | ||
| 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 | ||
| 296 | end | ||
| 297 | do | ||
| 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 | ||
| 337 | end | ||
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 @@ | |||
| 1 | assert(_u5bf9_u8c61 == nil) | ||
| 2 | local _u7ed3_u679c = (_u5bf9_u8c61 == nil) | ||
| 3 | if _u51fd_u65701() then | ||
| 4 | _u6253_u5370("没问题") | ||
| 5 | end | ||
| 6 | if (_u51fd_u65701() and _u51fd_u65702() and _u51fd_u65703()) then | ||
| 7 | _u6253_u5370("没问题") | ||
| 8 | end | ||
| 9 | local _u5bf9_u8c61 | ||
| 10 | do | ||
| 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 | ||
| 30 | end | ||
| 31 | if (_u53d8_u91cfx == "🍎" or _u53d8_u91cfx == "🐷" or _u53d8_u91cfx == "🐶") then | ||
| 32 | _u6253_u5370("存在") | ||
| 33 | end | ||
| 34 | local _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 | ||
| 60 | end)() | ||
| 61 | for _index_0 = 1, #_list_0 do | ||
| 62 | local _ = _list_0[_index_0] | ||
| 63 | _u6253_u5370(_) | ||
| 64 | end | ||
| 65 | local _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 | ||
| 91 | end)() | ||
| 92 | for _index_0 = 1, #_list_1 do | ||
| 93 | local _ = _list_1[_index_0] | ||
| 94 | _u6253_u5370(_) | ||
| 95 | end | ||
| 96 | local _u503c | ||
| 97 | do | ||
| 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 | ||
| 139 | end | ||
| 140 | local _call_0 = (1 + 2) | ||
| 141 | _call_0["调用"](_call_0, 123) | ||
| 142 | _u7ed3_u679c = (1 + 2) | ||
| 143 | local f | ||
| 144 | f = 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 | ||
| 150 | end | ||
| 151 | do | ||
| 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) | ||
| 162 | end | ||
| 163 | do | ||
| 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) | ||
| 176 | end | ||
| 177 | local _u53d8_u91cfx = 0 | ||
| 178 | local function f(a) | ||
| 179 | return a + 1 | ||
| 180 | end | ||
| 181 | x = x + f(3) | ||
| 182 | function tb:func() | ||
| 183 | print(123) | ||
| 184 | end | ||
| 185 | _u6253_u5370(_u53d8_u91cfx) | ||
| 186 | local sel | ||
| 187 | sel = function(_u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c) | ||
| 188 | if _u53c2_u6570a then | ||
| 189 | return _u53c2_u6570b | ||
| 190 | else | ||
| 191 | return _u53c2_u6570c | ||
| 192 | end | ||
| 193 | end | ||
| 194 | local function sel(a, b, c) | ||
| 195 | if a then | ||
| 196 | return b | ||
| 197 | else | ||
| 198 | return c | ||
| 199 | end | ||
| 200 | end | ||
| 201 | local function dummy() | ||
| 202 | |||
| 203 | end | ||
| 204 | -- 这有个注释 | ||
| 205 | local _ = require('下划线') | ||
| 206 | local _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 | ||
| 217 | end) | ||
| 218 | _call_1 = _call_1["过滤"](_call_1, _call_1, function(self) | ||
| 219 | return self > 3 | ||
| 220 | end) | ||
| 221 | local _u7ed3_u679ca = _call_1["取值"](_call_1) | ||
| 222 | local _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 | ||
| 233 | end) | ||
| 234 | _call_2 = _call_2["过滤"](_call_2, _call_2, function(self) | ||
| 235 | return self > 3 | ||
| 236 | end) | ||
| 237 | _call_2["每一个"](_call_2, function(self) | ||
| 238 | return _u6253_u5370(self) | ||
| 239 | end) | ||
| 240 | local _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, "(克隆)") | ||
| 249 | end) | ||
| 250 | _u7ed3_u679c = _call_3["摧毁"](_call_3) | ||
| 251 | do | ||
| 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) | ||
| 269 | end | ||
| 270 | local _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, "(克隆)") | ||
| 274 | end):_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 | -- 待实现 | ||
| 306 | do | ||
| 307 | _u6253_u5370(1) | ||
| 308 | end | ||
| 309 | local _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 | ||
| 319 | end | ||
| 320 | _u6253_u5370('abc') | ||
| 321 | return 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 @@ | |||
| 1 | local _u53d8_u91cfa = setmetatable({ | ||
| 2 | ["关闭"] = true, | ||
| 3 | }, { | ||
| 4 | __close = function(self) | ||
| 5 | return _u6253_u5370("离开作用域") | ||
| 6 | end | ||
| 7 | }) | ||
| 8 | local _u53d8_u91cfb = setmetatable({ }, { | ||
| 9 | __add = function(_u5de6, _u53f3) | ||
| 10 | return _u53f3 - _u5de6 | ||
| 11 | end | ||
| 12 | }) | ||
| 13 | local _u53d8_u91cfc = setmetatable({ | ||
| 14 | ["键1"] = true, | ||
| 15 | ["键2"] = true | ||
| 16 | }, { | ||
| 17 | __add = add | ||
| 18 | }) | ||
| 19 | local _u53d8_u91cfw = setmetatable({ }, { | ||
| 20 | [_u540d_u79f0] = 123, | ||
| 21 | ["新建"] = function(self, _u503c) | ||
| 22 | return { | ||
| 23 | _u503c | ||
| 24 | } | ||
| 25 | end | ||
| 26 | }) | ||
| 27 | getmetatable(_u53d8_u91cfw)["新建"](getmetatable(_u53d8_u91cfw)[_u540d_u79f0]) | ||
| 28 | do | ||
| 29 | local _ <close> = setmetatable({ }, { | ||
| 30 | __close = function() | ||
| 31 | return _u6253_u5370("离开作用域") | ||
| 32 | end | ||
| 33 | }) | ||
| 34 | end | ||
| 35 | local _u53d8_u91cfd, _u53d8_u91cfe = _u53d8_u91cfa["关闭"], getmetatable(_u53d8_u91cfa).__close | ||
| 36 | local _u53d8_u91cff = getmetatable(_u53d8_u91cfa):__close(1) | ||
| 37 | getmetatable(_u53d8_u91cfa).__add = function(x, y) | ||
| 38 | return x + y | ||
| 39 | end | ||
| 40 | do | ||
| 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) | ||
| 48 | end | ||
| 49 | do | ||
| 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 | ||
| 65 | end | ||
| 66 | setmetatable(_u53d8_u91cfa["变量b"], { }) | ||
| 67 | _u53d8_u91cfx.abc = 123 | ||
| 68 | setmetatable(_u51fd_u6570(), mt) | ||
| 69 | setmetatable(_u53d8_u91cfb["变量c"], mt) | ||
| 70 | _u53d8_u91cfa, _u53d8_u91cfd, _u53d8_u91cfe = 1, "abc", nil | ||
| 71 | local _u76f8_u540c = getmetatable(_u53d8_u91cfa).__index == getmetatable(_u53d8_u91cfa).__index | ||
| 72 | setmetatable(_u53d8_u91cfa, { | ||
| 73 | __index = _u8868 | ||
| 74 | }) | ||
| 75 | getmetatable(_u53d8_u91cfa).__index = _u8868 | ||
| 76 | getmetatable(_u53d8_u91cfa).__index = _u8868 | ||
| 77 | local mt = getmetatable(_u53d8_u91cfa) | ||
| 78 | local _call_0 = _u8868 | ||
| 79 | _call_0["函数"](_call_0, #_u5217_u8868) | ||
| 80 | do | ||
| 81 | local _obj_0 = getmetatable(_u8868) | ||
| 82 | _obj_0["函数"](_obj_0, _u5217_u8868) | ||
| 83 | end | ||
| 84 | do | ||
| 85 | local _obj_0 = getmetatable(_u8868) | ||
| 86 | _obj_0["函数"](_obj_0, _u5217_u8868) | ||
| 87 | end | ||
| 88 | local index, _u8bbe_u7f6e_u51fd_u6570 | ||
| 89 | do | ||
| 90 | local _obj_0 = getmetatable(require("模块")) | ||
| 91 | index, _u8bbe_u7f6e_u51fd_u6570 = _obj_0.__index, _obj_0.__newindex | ||
| 92 | end | ||
| 93 | do | ||
| 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["测试"])) | ||
| 102 | end | ||
| 103 | mt = getmetatable(_u53d8_u91cfa) | ||
| 104 | _u53d8_u91cfa = setmetatable({ }, mt) | ||
| 105 | _u53d8_u91cfa = setmetatable({ }, { | ||
| 106 | __index = mt | ||
| 107 | }) | ||
| 108 | local index | ||
| 109 | local _u7d22_u5f15 = getmetatable(_u53d8_u91cfa).__index | ||
| 110 | index = getmetatable(_u53d8_u91cfa).__index | ||
| 111 | do | ||
| 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 | ||
| 117 | end | ||
| 118 | do | ||
| 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 | ||
| 124 | end | ||
| 125 | local _u8868 = { } | ||
| 126 | do | ||
| 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, ...) | ||
| 143 | end | ||
| 144 | do | ||
| 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, ...) | ||
| 159 | end | ||
| 160 | do | ||
| 161 | _u53d8_u91cff = getmetatable(_u8868)["值"](123, ...) | ||
| 162 | _u53d8_u91cff = getmetatable(_u8868)["值" .. tostring(x < y)](123, ...) | ||
| 163 | _u53d8_u91cff(getmetatable(_u8868)['值'](123, ...)) | ||
| 164 | getmetatable(_u8868)[ [[ 值 | ||
| 165 | 1]]](123, ...) | ||
| 166 | return getmetatable(_u8868)["值" .. tostring(x > y)](123, ...) | ||
| 167 | end | ||
| 168 | return 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 @@ | |||
| 1 | local _u53d8_u91cfx = _u53d8_u91cfa["变量b"]["变量c"]["变量d"] | ||
| 2 | local _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) | ||
| 7 | end)(), (function() | ||
| 8 | local _call_1 = _u53c2_u65703["值"] | ||
| 9 | return _call_1["获取"](_call_1) | ||
| 10 | end)(), { | ||
| 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 | }) | ||
| 24 | local _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 | } | ||
| 36 | local _u8868b | ||
| 37 | do | ||
| 38 | local _obj_0 = _u51fd_u65702 | ||
| 39 | if _obj_0 ~= nil then | ||
| 40 | _u8868b = _obj_0("abc", _u51fd_u65701({ })["变量a"]) | ||
| 41 | end | ||
| 42 | end | ||
| 43 | local _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 | ||
| 56 | end | ||
| 57 | local _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)() | ||
| 63 | end | ||
| 64 | local _call_1 = _u539f_u59cb["转换"].root.gameObject | ||
| 65 | local _call_2 = _call_1["父节点"](_call_1) | ||
| 66 | local _call_3 = _call_2["后代节点"](_call_2) | ||
| 67 | local _call_4 = _call_3["选择启用"](_call_3) | ||
| 68 | local _call_5 = _call_4["选择可见"](_call_4) | ||
| 69 | local _call_6 = _call_5["标签相等"](_call_5, "fx") | ||
| 70 | local _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)") | ||
| 76 | end) | ||
| 77 | local _u7ed3_u679c = _call_7["销毁"](_call_7) | ||
| 78 | local _call_8 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] | ||
| 79 | local _call_9 = _call_8["父节点"](_call_8) | ||
| 80 | local _call_10 = _call_9["后代节点"](_call_9) | ||
| 81 | local _call_11 = _call_10["选择启用"](_call_10) | ||
| 82 | local _call_12 = _call_11["选择可见"](_call_11) | ||
| 83 | local _call_13 = _call_12["标签相等"](_call_12, "fx") | ||
| 84 | local _call_14 = _call_13["筛选"](_call_13, function(_u5143_u7d20) | ||
| 85 | local _call_14 = _u5143_u7d20["名称"] | ||
| 86 | return _call_14["结束于"](_call_14, _call_14, "(Clone)") | ||
| 87 | end) | ||
| 88 | _call_14["销毁"](_call_14) | ||
| 89 | do | ||
| 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 | ||
| 134 | end | ||
| 135 | return 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 @@ | |||
| 1 | do | ||
| 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 | ||
| 11 | end | ||
| 12 | do | ||
| 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 | ||
| 22 | end | ||
| 23 | do | ||
| 24 | local _u53d8_u91cfa = _u51fd_u6570() | ||
| 25 | if _u53d8_u91cfa == nil then | ||
| 26 | _u53d8_u91cfa = false | ||
| 27 | end | ||
| 28 | end | ||
| 29 | do | ||
| 30 | local _u53d8_u91cfa | ||
| 31 | if _u53d8_u91cfa == nil then | ||
| 32 | _u53d8_u91cfa = _u51fd_u6570() | ||
| 33 | end | ||
| 34 | end | ||
| 35 | do | ||
| 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 | ||
| 50 | end | ||
| 51 | do | ||
| 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 | ||
| 75 | end | ||
| 76 | do | ||
| 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)()) | ||
| 85 | end | ||
| 86 | do | ||
| 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 | ||
| 99 | end | ||
| 100 | do | ||
| 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)() | ||
| 109 | end | ||
| 110 | do | ||
| 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 | ||
| 119 | end | ||
| 120 | do | ||
| 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 | ||
| 138 | end | ||
| 139 | do | ||
| 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 | ||
| 156 | end | ||
| 157 | do | ||
| 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 | ||
| 181 | end | ||
| 182 | return 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 @@ | |||
| 1 | local _u6570_u5b57x = 1 + 3 | ||
| 2 | local _u6570_u5b57y = 1 + 3 | ||
| 3 | local _u6570_u5b57z = 1 + 3 + 4 | ||
| 4 | local _u6570_u5b57k = _u53d8_u91cfb and _u53d8_u91cfc and _u53d8_u91cfg | ||
| 5 | local _u53d8_u91cfh = _u4e1c_u897f and function() | ||
| 6 | return _u6253_u5370("你好 世界") | ||
| 7 | end | ||
| 8 | local _u53d8_u91cfi = _u4e1c_u897f or function() | ||
| 9 | return _u6253_u5370("你好 世界") | ||
| 10 | end | ||
| 11 | local _u53d8_u91cfp = _u4e1c_u897f and function() end | ||
| 12 | _u6253_u5370("你好 世界") | ||
| 13 | local _u53d8_u91cfs = _u4e1c_u897f or function() end and 234 | ||
| 14 | local _u53d8_u91cfu = { | ||
| 15 | ["颜色"] = 1 and 2 and 3, | ||
| 16 | 4, | ||
| 17 | 4 | ||
| 18 | } | ||
| 19 | local _u53d8_u91cfv = { | ||
| 20 | ["颜色"] = 1 and function() | ||
| 21 | return "yeah" | ||
| 22 | end, | ||
| 23 | "great", | ||
| 24 | ["好的"] = 3 ^ 2 | ||
| 25 | } | ||
| 26 | local _u53d8_u91cfnno = (_u662f_u7684 + 2) | ||
| 27 | local _u53d8_u91cfnn = (_u662f_u7684 + 2) | ||
| 28 | local _u53d8_u91cfn = _u4f60_u597d(_u53d8_u91cfb)(function() end) | ||
| 29 | return _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 | ||
| 12 | end), function(_u53d8_u91cfx) | ||
| 13 | return _u53d8_u91cfx > 4 | ||
| 14 | end), 0, function(_u53d8_u91cfa, _u53d8_u91cfb) | ||
| 15 | return _u53d8_u91cfa + _u53d8_u91cfb | ||
| 16 | end)) | ||
| 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 | ||
| 25 | end)(), ",")) | ||
| 26 | local _u53d8_u91cfb = 1 + 2 + (_u6253_u5370(tostring(4), 1) or 123) | ||
| 27 | do | ||
| 28 | local _u53d8_u91cfx = math.max(233, 998) | ||
| 29 | if _u53d8_u91cfx then | ||
| 30 | _u6253_u5370(_u53d8_u91cfx) | ||
| 31 | end | ||
| 32 | end | ||
| 33 | do | ||
| 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)) | ||
| 43 | end | ||
| 44 | do | ||
| 45 | local _obj_0 = _u51fd_u6570f | ||
| 46 | if _obj_0 ~= nil then | ||
| 47 | _obj_0(123) | ||
| 48 | end | ||
| 49 | end | ||
| 50 | do | ||
| 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 | ||
| 61 | end | ||
| 62 | local _u53d8_u91cfc | ||
| 63 | do | ||
| 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 | ||
| 74 | end | ||
| 75 | local _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 | ||
| 82 | end | ||
| 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) | ||
| 88 | local _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)) | ||
| 97 | do | ||
| 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) | ||
| 110 | end | ||
| 111 | local _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") | ||
| 114 | end)() 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 | ||
| 125 | end)() 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 | ||
| 131 | end)() | ||
| 132 | local _u53d8_u91cfx1 = 3 * _u51fd_u6570f(-4) | ||
| 133 | local _u53d8_u91cfx2 = 3 * _u51fd_u6570f(-2 ^ 2) | ||
| 134 | local _u53d8_u91cfy = 1 + _u51fd_u6570b(3, (_u51fd_u6570a ^ _u51fd_u6570c)(not #2)) * _u51fd_u65701(_u51fd_u6570f(4 ^ -123)) or 123 | ||
| 135 | return 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 @@ | |||
| 1 | local _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) | ||
| 8 | end)()) | ||
| 9 | local _call_1 = _u53d8_u91cfb["函数"] | ||
| 10 | local _call_2 = _call_1["执行"](_call_1) | ||
| 11 | local _call_3 = _call_2["当"](_call_2, "好") | ||
| 12 | local _u7ed3_u679c = _call_3["如果"](_call_3, "def", 998) | ||
| 13 | local _call_4 = _u53d8_u91cfc["重复"]["如果"] | ||
| 14 | local _call_5 = _call_4["然后"](_call_4, "xyz") | ||
| 15 | _call_5["否则"](_call_5, _u7ed3_u679c) | ||
| 16 | _u6253_u5370(self["循环"], self.__class["函数"](self.__class, 123)) | ||
| 17 | do | ||
| 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 | ||
| 24 | end | ||
| 25 | local _u6d88_u606f | ||
| 26 | do | ||
| 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 | ||
| 31 | end | ||
| 32 | local _u6570_u503cA | ||
| 33 | do | ||
| 34 | local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5() | ||
| 35 | if _u65b9_u6cd5 then | ||
| 36 | _u6570_u503cA = _u65b9_u6cd5() | ||
| 37 | end | ||
| 38 | end | ||
| 39 | local _u6570_u503cA | ||
| 40 | do | ||
| 41 | local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5() | ||
| 42 | if _u65b9_u6cd5 then | ||
| 43 | _u6570_u503cA = _u65b9_u6cd5() | ||
| 44 | end | ||
| 45 | end | ||
| 46 | local _u6570_u503cB | ||
| 47 | do | ||
| 48 | local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5() | ||
| 49 | if _u65b9_u6cd5 ~= nil then | ||
| 50 | _u6570_u503cB = _u65b9_u6cd5() | ||
| 51 | end | ||
| 52 | end | ||
| 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 | } | ||
| 67 | local _u5f00_u59cb = { | ||
| 68 | ["东西"] = "冷" | ||
| 69 | } | ||
| 70 | local _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 @@ | |||
| 1 | local _ | ||
| 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 | ||
| 8 | end | ||
| 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 | ||
| 19 | end | ||
| 20 | do | ||
| 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 | ||
| 26 | end | ||
| 27 | do | ||
| 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 | ||
| 37 | end | ||
| 38 | do | ||
| 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 | ||
| 46 | end | ||
| 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 | ||
| 67 | end | ||
| 68 | do | ||
| 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 | ||
| 88 | end | ||
| 89 | do | ||
| 90 | return { | ||
| 91 | ["值"] = _u503c, | ||
| 92 | ["物品A"] = 123, | ||
| 93 | ["物品B"] = "abc" | ||
| 94 | } | ||
| 95 | end | ||
| 96 | do | ||
| 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 | ||
| 112 | end | ||
| 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 | ||
| 119 | end | ||
| 120 | do | ||
| 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 | ||
| 126 | end | ||
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 @@ | |||
| 1 | local _u4f60_u597d = "你好" | ||
| 2 | local _u95ee_u5019 = "啥事,好吧" | ||
| 3 | _u6253_u5370(_u4f60_u597d) | ||
| 4 | local _u55ef = '嗯' | ||
| 5 | local _u8fd9_u91cc, _u53e6_u4e00_u4e2a = "好的", '世界' | ||
| 6 | local _u5440 = "YU'M" | ||
| 7 | _u4f60('我说:"嗯"') | ||
| 8 | _u6253_u5370(_u5440, _u4f60) | ||
| 9 | _u53e6_u4e00_u4e2a = [[ 你好 世界 ]] | ||
| 10 | local _u4f60_u597d__u90a3_u91cc = [[ 你好呀 | ||
| 11 | ]] | ||
| 12 | local _u597d_u5427 = [==[ "helo" ]==] | ||
| 13 | local _u54c8_u55bd = [===[ eat noots]===] | ||
| 14 | local _u55ef_u55ef = [[well trhere]] | ||
| 15 | local _u6587_u5b57 = [[ | ||
| 16 | nil | ||
| 17 | Fail to compile | ||
| 18 | ]] | ||
| 19 | _u6587_u5b57[ [[abc]]] = [["#{变量i}" for 变量i = 1, 10] for 变量i = 1, 10]] | ||
| 20 | local _u54e6_u54e6 = "" | ||
| 21 | local _u53d8_u91cfx = "\\" | ||
| 22 | _u53d8_u91cfx = "a\\b" | ||
| 23 | _u53d8_u91cfx = "\\\n" | ||
| 24 | _u53d8_u91cfx = "\"" | ||
| 25 | local _u53d8_u91cfa = "你好 " .. tostring(_u95ee_u5019) .. " 你好" | ||
| 26 | local _u53d8_u91cfb = tostring(_u95ee_u5019) .. " 你好" | ||
| 27 | local _u53d8_u91cfc = "你好 " .. tostring(5 + 1) | ||
| 28 | local _u53d8_u91cfd = tostring(_u4f60_u597d(_u4e16_u754c)) | ||
| 29 | local _u53d8_u91cfe = tostring(1) .. " " .. tostring(2) .. " " .. tostring(3) | ||
| 30 | local _u53d8_u91cff = [[你好 #{世界} 世界]] | ||
| 31 | local _u53d8_u91cfg = "#{你好 世界}" | ||
| 32 | _u53d8_u91cfa = '你好 #{问候} 你好' | ||
| 33 | _u53d8_u91cfb = '#{问候} 你好' | ||
| 34 | _u53d8_u91cfc = '你好 #{问候}' | ||
| 35 | local _u53d8_u91cf_ = "你好" | ||
| 36 | local _call_0 = ("你好") | ||
| 37 | _call_0["格式"](_call_0, 1) | ||
| 38 | local _call_1 = ("你好") | ||
| 39 | _call_1["格式"](_call_1, 1, 2, 3) | ||
| 40 | local _call_2 = ("你好") | ||
| 41 | _call_2["格式"](_call_2, 1, 2, 3)(1, 2, 3) | ||
| 42 | local _call_3 = ("你好") | ||
| 43 | _call_3["世界"](_call_3) | ||
| 44 | local _call_4 = ("你好") | ||
| 45 | _call_4["格式"](_call_4)["问候"](1, 2, 3) | ||
| 46 | local _call_5 = ("你好") | ||
| 47 | _call_5["格式"](_call_5, 1, 2, 3) | ||
| 48 | local _call_6 = _u67d0_u4e8b("你好") | ||
| 49 | _call_6["世界"](_call_6) | ||
| 50 | return _u67d0_u4e8b((function() | ||
| 51 | local _call_7 = ("你好") | ||
| 52 | return _call_7["世界"](_call_7) | ||
| 53 | end)()) | ||
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 @@ | |||
| 1 | local _u53d8_u91cfx = { | ||
| 2 | ["值"] = 100, | ||
| 3 | ["你好"] = function(self) | ||
| 4 | return _u6253_u5370(self.val) | ||
| 5 | end | ||
| 6 | } | ||
| 7 | local _u51fd_u6570 | ||
| 8 | do | ||
| 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 | ||
| 14 | end | ||
| 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 | ||
| 25 | end)() | ||
| 26 | return 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 @@ | |||
| 1 | do | ||
| 2 | local _exp_0 = _u503c | ||
| 3 | if "酷" == _exp_0 then | ||
| 4 | _u6253_u5370("你好,世界") | ||
| 5 | end | ||
| 6 | end | ||
| 7 | do | ||
| 8 | local _exp_0 = _u503c | ||
| 9 | if "酷" == _exp_0 then | ||
| 10 | _u6253_u5370("你好,世界") | ||
| 11 | else | ||
| 12 | _u6253_u5370("好的,很棒") | ||
| 13 | end | ||
| 14 | end | ||
| 15 | do | ||
| 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 | ||
| 26 | end | ||
| 27 | local _u8f93_u51fa | ||
| 28 | do | ||
| 29 | local _exp_0 = _u503c | ||
| 30 | if "酷" == _exp_0 then | ||
| 31 | _u8f93_u51fa = _u6253_u5370("你好,世界") | ||
| 32 | else | ||
| 33 | _u8f93_u51fa = _u6253_u5370("好的,很棒") | ||
| 34 | end | ||
| 35 | end | ||
| 36 | do | ||
| 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 | ||
| 45 | end | ||
| 46 | do | ||
| 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 | ||
| 56 | end | ||
| 57 | _u4fee_u590d(_u8fd9_u4e2a) | ||
| 58 | call_func((function() | ||
| 59 | local _exp_0 = _u67d0_u7269 | ||
| 60 | if 1 == _exp_0 then | ||
| 61 | return "是" | ||
| 62 | else | ||
| 63 | return "否" | ||
| 64 | end | ||
| 65 | end)()) | ||
| 66 | do | ||
| 67 | local _exp_0 = _u55e8 | ||
| 68 | if (_u4f60_u597d or _u4e16_u754c) == _exp_0 then | ||
| 69 | local _u53d8_u91cf_ = _u7eff_u8272 | ||
| 70 | end | ||
| 71 | end | ||
| 72 | do | ||
| 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 | ||
| 79 | end | ||
| 80 | do | ||
| 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 | ||
| 89 | end | ||
| 90 | do | ||
| 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 | ||
| 171 | end | ||
| 172 | do | ||
| 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 | ||
| 242 | end | ||
| 243 | do | ||
| 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 | ||
| 290 | end | ||
| 291 | do | ||
| 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 | ||
| 316 | end | ||
| 317 | do | ||
| 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 | ||
| 343 | end | ||
| 344 | do | ||
| 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 | ||
| 381 | end | ||
| 382 | do | ||
| 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 | ||
| 400 | end | ||
| 401 | return 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 @@ | |||
| 1 | local _u53d8_u91cfa = 1 + 2 * 3 / 6 | ||
| 2 | local _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) | ||
| 5 | local _u6211_u4eec | ||
| 6 | _u8fd9_u91cc, _u6211_u4eec = function() end, _u662f_u7684 | ||
| 7 | local _u8fd9_u4e2a, _u4e0d_u540c | ||
| 8 | _u8fd9_u4e2a, _u4e0d_u540c = function() | ||
| 9 | return _u65b9_u6cd5 | ||
| 10 | end, _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])) | ||
| 21 | local _ = (_u5f97_u5230[_u67d0_u4e8b] + 5)[_u5e74] | ||
| 22 | local _u53d8_u91cfi, _u53d8_u91cfx = 200, 300 | ||
| 23 | local _u662f_u7684 = (1 + 5) * 3 | ||
| 24 | _u662f_u7684 = ((1 + 5) * 3) / 2 | ||
| 25 | _u662f_u7684 = ((1 + 5) * 3) / 2 + _u53d8_u91cfi % 100 | ||
| 26 | local _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("你好") | ||
| 32 | end | ||
| 33 | _ = function() | ||
| 34 | if _u4f60_u597d then | ||
| 35 | return "你好", "世界" | ||
| 36 | else | ||
| 37 | return _u4e0d, _u65b9_u6cd5 | ||
| 38 | end | ||
| 39 | end | ||
| 40 | _ = function() | ||
| 41 | return 1, 2, 34 | ||
| 42 | end | ||
| 43 | return 5 + function() | ||
| 44 | return 4 + 2 | ||
| 45 | end | ||
| 46 | return 5 + (function() | ||
| 47 | return 4 | ||
| 48 | end) + 2 | ||
| 49 | _u6253_u5370(5 + function() | ||
| 50 | _ = 34 | ||
| 51 | return _u597d(_u7403) | ||
| 52 | end) | ||
| 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] | ||
| 67 | local _call_0 = _u5206_u88c2("abc xyz 123") | ||
| 68 | local _call_1 = _call_0["映射"](_call_0, "#") | ||
| 69 | _call_1["打印全部"](_call_1) | ||
| 70 | _ = f("")[_u53d8_u91cfa] | ||
| 71 | local _call_2 = f("") | ||
| 72 | _ = _call_2["变量b"](_call_2) | ||
| 73 | _ = f("")["变量c"]() | ||
| 74 | f(("")[_u53d8_u91cfa]) | ||
| 75 | f((function() | ||
| 76 | local _call_3 = ("") | ||
| 77 | return _call_3["变量b"](_call_3) | ||
| 78 | end)()) | ||
| 79 | f(("")["变量c"]()) | ||
| 80 | local _call_3 = _u5217_u8868({ | ||
| 81 | "abc", | ||
| 82 | "xyz", | ||
| 83 | "123" | ||
| 84 | }) | ||
| 85 | local _call_4 = _call_3["映射"](_call_3, "#") | ||
| 86 | _call_4["打印全部"](_call_4) | ||
| 87 | _ = f({ })[_u53d8_u91cfa] | ||
| 88 | local _call_5 = f({ }) | ||
| 89 | _ = _call_5["变量b"](_call_5) | ||
| 90 | _ = f({ })["变量c"]() | ||
| 91 | local _u67d0_u4e8b = { | ||
| 92 | ["测试"] = 12323, | ||
| 93 | ["什么"] = function() | ||
| 94 | return _u6253_u5370("你好 世界") | ||
| 95 | end | ||
| 96 | } | ||
| 97 | _u6253_u5370(_u67d0_u4e8b["测试"]) | ||
| 98 | local _u5929_u54ea = { | ||
| 99 | ["你好"] = "世界" | ||
| 100 | } | ||
| 101 | local _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))) | ||
| 125 | local _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 | ||
| 134 | end)() | ||
| 135 | if _u9177 then | ||
| 136 | _u6253_u5370("你好") | ||
| 137 | end | ||
| 138 | if not _u9177 then | ||
| 139 | _u6253_u5370("你好") | ||
| 140 | end | ||
| 141 | if not (1212 and 3434) then | ||
| 142 | _u6253_u5370("你好") | ||
| 143 | end | ||
| 144 | for i = 1, 10 do | ||
| 145 | _u6253_u5370("你好") | ||
| 146 | end | ||
| 147 | _u6253_u5370("疯子") | ||
| 148 | if _u4f60_u597d then | ||
| 149 | _ = 343 | ||
| 150 | end | ||
| 151 | if _u9177 then | ||
| 152 | _u6253_u5370("什么") | ||
| 153 | end | ||
| 154 | while 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) | ||
| 160 | end | ||
| 161 | while 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) | ||
| 167 | end | ||
| 168 | (function(...) | ||
| 169 | local _u53c2_u6570 = { | ||
| 170 | ... | ||
| 171 | } | ||
| 172 | end)() | ||
| 173 | _u53d8_u91cfx = function(...) | ||
| 174 | return dump({ | ||
| 175 | ... | ||
| 176 | }) | ||
| 177 | end | ||
| 178 | _u53d8_u91cfx = not true | ||
| 179 | local _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) | ||
| 194 | local _call_6 = _u67d0_u4e8b["你好"] | ||
| 195 | _call_6["世界"](_call_6, _u53d8_u91cfa, _u53d8_u91cfb) | ||
| 196 | local _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) | ||
| 200 | local _u53d8_u91cfj = _u53d8_u91cfj - "你好" | ||
| 201 | _u53d8_u91cfy = _u53d8_u91cfy * 2 | ||
| 202 | _u53d8_u91cfy = _u53d8_u91cfy / 100 | ||
| 203 | _u53d8_u91cfy = _u53d8_u91cfy // 100 | ||
| 204 | local _u53d8_u91cfm = _u53d8_u91cfm % 2 | ||
| 205 | local _u4f60_u597d = _u4f60_u597d .. "世界" | ||
| 206 | self.__class["某事"] = self.__class["某事"] + 10 | ||
| 207 | self["某事"] = self["某事"] + 10 | ||
| 208 | local _update_0 = "你好" | ||
| 209 | _u53d8_u91cfa[_update_0] = _u53d8_u91cfa[_update_0] + 10 | ||
| 210 | local _update_1 = "你好" .. tostring(tostring(ff)) | ||
| 211 | _u53d8_u91cfa[_update_1] = _u53d8_u91cfa[_update_1] + 10 | ||
| 212 | local _obj_0 = _u53d8_u91cfa[_u56db] | ||
| 213 | _obj_0["字段x"] = _obj_0["字段x"] + 10 | ||
| 214 | _u53d8_u91cfa["变量b"] = _u53d8_u91cfa["变量b"] + 1 | ||
| 215 | local _obj_1 = _u53d8_u91cfa["变量b"][1]["变量c"] | ||
| 216 | local _update_2 = 2 + 3 | ||
| 217 | _obj_1[_update_2] = _obj_1[_update_2] + 1 | ||
| 218 | do | ||
| 219 | local _with_0 = _u8868 | ||
| 220 | local _obj_2 = _with_0["字段a"] | ||
| 221 | _obj_2["变量c"] = _obj_2["变量c"] + 1 | ||
| 222 | end | ||
| 223 | do | ||
| 224 | local _obj_2 = _u8868 | ||
| 225 | _obj_2[#_obj_2 + 1] = 10 | ||
| 226 | end | ||
| 227 | do | ||
| 228 | local _obj_2 = _u53d8_u91cfa["变量b"]["变量c"] | ||
| 229 | _obj_2[#_obj_2 + 1] = 1 | ||
| 230 | end | ||
| 231 | if _u6761_u4ef6v then | ||
| 232 | _u53d8_u91cfx[#_u53d8_u91cfx + 1] = 1 | ||
| 233 | else | ||
| 234 | _u53d8_u91cfx[#_u53d8_u91cfx + 1] = 2 | ||
| 235 | end | ||
| 236 | do | ||
| 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 | ||
| 247 | end | ||
| 248 | do | ||
| 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 | ||
| 252 | end | ||
| 253 | local _u8868 = { } | ||
| 254 | _u8868[#_u8868 + 1] = 1 | ||
| 255 | _u8868[#_u8868 + 1] = 2 | ||
| 256 | _u8868[#_u8868 + 1] = 3 | ||
| 257 | _u53d8_u91cfx = 0 | ||
| 258 | local _list_0 = _u503c | ||
| 259 | for _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 | ||
| 264 | end | ||
| 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 | } | ||
| 278 | div({ | ||
| 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) | ||
| 294 | end)() | ||
| 295 | if _u67d0_u7269 then | ||
| 296 | _ = 03589 | ||
| 297 | else | ||
| 298 | _ = 3434 | ||
| 299 | end | ||
| 300 | if _u67d0_u7269 then | ||
| 301 | _ = _u662f_u7684 | ||
| 302 | elseif "嗯嗯嗯" then | ||
| 303 | _u6253_u5370("酷") | ||
| 304 | else | ||
| 305 | _ = _u597d_u7684 | ||
| 306 | end | ||
| 307 | _u53d8_u91cfx = _u4e0d_u662f_u67d0_u7269 | ||
| 308 | _u53d8_u91cfy = _u5982_u679c_u67d0_u7269 | ||
| 309 | local _u53d8_u91cfz = _u53d8_u91cfx(_u4e0e(_u53d8_u91cfb)) | ||
| 310 | _u53d8_u91cfz = _u53d8_u91cfx(_u4e0eb) | ||
| 311 | while 10 > _u67d0_u7269({ | ||
| 312 | ["某物"] = "世界" | ||
| 313 | }) do | ||
| 314 | _u6253_u5370("是的") | ||
| 315 | end | ||
| 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) | ||
| 359 | end, function(_u9519_u8bef) | ||
| 360 | return _u6253_u5370(_u9519_u8bef) | ||
| 361 | end) | ||
| 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 | ||
| 377 | local _u5b57_u7b26_u4e32 = _u5b57_u7b26_u4e32A .. _u5b57_u7b26_u4e32B .. _u5b57_u7b26_u4e32C | ||
| 378 | _u51fd_u6570(3000, "192.168.1.1") | ||
| 379 | local f | ||
| 380 | f = function() | ||
| 381 | return _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff | ||
| 382 | end | ||
| 383 | f = function() | ||
| 384 | return _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff | ||
| 385 | end | ||
| 386 | do | ||
| 387 | local _with_0 = _u5bf9_u8c61 | ||
| 388 | _u8c03_u7528(_with_0["函数"](_with_0), 123, "abc") | ||
| 389 | end | ||
| 390 | _u8c03_u7528A(_u8c03_u7528B(_u8c03_u7528C(123))) | ||
| 391 | _u8c03_u7528A(_u8c03_u7528B(_u8c03_u7528C(123))) | ||
| 392 | local _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 | } | ||
| 410 | do | ||
| 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)) | ||
| 423 | end | ||
| 424 | do | ||
| 425 | f = function(_u53d8_u91cfa, _u53d8_u91cfb) | ||
| 426 | return _u53d8_u91cfa + _u53d8_u91cfb | ||
| 427 | end | ||
| 428 | f(_u53d8_u91cfa, _u53d8_u91cfb) | ||
| 429 | f() | ||
| 430 | end | ||
| 431 | return 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 @@ | |||
| 1 | local _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 | } | ||
| 15 | local _u5f00_u59cb = { | ||
| 16 | ["东西"] = "冷" | ||
| 17 | } | ||
| 18 | local _u6d74 = { | ||
| 19 | ["开"] = "火" | ||
| 20 | } | ||
| 21 | local _u53e6_u4e00_u4e2a = { | ||
| 22 | [4] = 232, | ||
| 23 | ["好食物"] = "是最好的" | ||
| 24 | } | ||
| 25 | local fwip_u53d8_u91cf = { | ||
| 26 | ["东西"] = _u4f60_u597d("什么"), | ||
| 27 | ["数字"] = 2323, | ||
| 28 | ["什么"] = yo_u53d8_u91cf("妈妈", "是的"), | ||
| 29 | ["水果"] = basket_u53d8_u91cf, | ||
| 30 | ["坚果"] = day_u53d8_u91cf | ||
| 31 | } | ||
| 32 | local frick_u53d8_u91cf = { | ||
| 33 | ["你好"] = "世界" | ||
| 34 | } | ||
| 35 | local frack_u53d8_u91cf, _u6700_u597d = { | ||
| 36 | ["你好"] = "世界", | ||
| 37 | ["米饭"] = 3434 | ||
| 38 | }, "什么" | ||
| 39 | local ya_u53d8_u91cf = { | ||
| 40 | 1, | ||
| 41 | 2, | ||
| 42 | 3, | ||
| 43 | ["键"] = 100, | ||
| 44 | 343, | ||
| 45 | "你好", | ||
| 46 | ["嗯"] = 232 | ||
| 47 | } | ||
| 48 | local x_u53d8_u91cf = { | ||
| 49 | 1, | ||
| 50 | 2, | ||
| 51 | 4343, | ||
| 52 | 343, | ||
| 53 | 343 | ||
| 54 | } | ||
| 55 | local g_u53d8_u91cf, p_u53d8_u91cf = { | ||
| 56 | 1, | ||
| 57 | 2, | ||
| 58 | ["nowy变量"] = "是", | ||
| 59 | 3, | ||
| 60 | 4, | ||
| 61 | ["嘿"] = 232, | ||
| 62 | ["另一个"] = "天" | ||
| 63 | }, 234 | ||
| 64 | local annother_u53d8_u91cf = { | ||
| 65 | 1, | ||
| 66 | 2, | ||
| 67 | 3, | ||
| 68 | 3, | ||
| 69 | 4, | ||
| 70 | 5, | ||
| 71 | 6, | ||
| 72 | 7, | ||
| 73 | 8 | ||
| 74 | } | ||
| 75 | local _u662f_u7684_u53d8_u91cf = { | ||
| 76 | [232] = 3434, | ||
| 77 | "你好", | ||
| 78 | ["冰"] = "蛋糕" | ||
| 79 | } | ||
| 80 | local 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 | } | ||
| 89 | x_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 | } | ||
| 104 | x_u53d8_u91cf = { | ||
| 105 | ["东西"] = _u4e1c_u897f, | ||
| 106 | ["东西"] = _u4e1c_u897f_u53d8_u91cf | ||
| 107 | } | ||
| 108 | local 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 | }) | ||
| 120 | local t_u53d8_u91cf = { | ||
| 121 | ["a变量"] = 'a', | ||
| 122 | [b_u53d8_u91cf] = 'b' | ||
| 123 | } | ||
| 124 | local xam_u53d8_u91cf = { | ||
| 125 | ["你好"] = 1234, | ||
| 126 | ["你好"] = 12354, | ||
| 127 | [ [[你好变量]]] = 12354, | ||
| 128 | ["你好"] = 12354, | ||
| 129 | [ [[你好变量]]] = 12354 | ||
| 130 | } | ||
| 131 | local 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 | } | ||
| 156 | keepit({ | ||
| 157 | ["继续"] = _u771f_u7684, | ||
| 158 | ["好的"] = "是的", | ||
| 159 | ["workd变量"] = "好的" | ||
| 160 | }) | ||
| 161 | _u4e8b_u60c5({ | ||
| 162 | ["什么"] = "伟大", | ||
| 163 | ["没有"] = "更多", | ||
| 164 | ["好的"] = 123 | ||
| 165 | }) | ||
| 166 | _u4e8b_u60c5({ | ||
| 167 | ["什么"] = "伟大", | ||
| 168 | ["没有"] = "更多" | ||
| 169 | }) | ||
| 170 | local __u53d8_u91cf = { | ||
| 171 | ["好的"] = 123 | ||
| 172 | } | ||
| 173 | local k_u53d8_u91cf = { | ||
| 174 | ["你好"] = "世界" | ||
| 175 | } | ||
| 176 | k_u53d8_u91cf = { | ||
| 177 | ['你好'] = '世界' | ||
| 178 | } | ||
| 179 | k_u53d8_u91cf = { | ||
| 180 | ["你好"] = '世界', | ||
| 181 | ["帽子"] = "zat变量" | ||
| 182 | } | ||
| 183 | _u8bf7({ | ||
| 184 | ["你好"] = "世界" | ||
| 185 | }) | ||
| 186 | k_u53d8_u91cf = { | ||
| 187 | ["你好"] = "世界", | ||
| 188 | ["一个"] = "区域" | ||
| 189 | } | ||
| 190 | local f1_u53d8_u91cf, f2_u53d8_u91cf, f3_u53d8_u91cf = "一个", { | ||
| 191 | ["两个"] = three_u53d8_u91cf | ||
| 192 | }, "四" | ||
| 193 | f1_u53d8_u91cf, f2_u53d8_u91cf = { | ||
| 194 | ["两个"] = three_u53d8_u91cf | ||
| 195 | }, "四" | ||
| 196 | f1_u53d8_u91cf = { | ||
| 197 | "一个", | ||
| 198 | ["两个"] = three_u53d8_u91cf, | ||
| 199 | "四" | ||
| 200 | } | ||
| 201 | local j1_u53d8_u91cf, j2_u53d8_u91cf, j3_u53d8_u91cf, j4_u53d8_u91cf = "一个", { | ||
| 202 | ["两个"] = three_u53d8_u91cf, | ||
| 203 | ["四"] = five_u53d8_u91cf | ||
| 204 | }, 6, 7 | ||
| 205 | local _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 | } | ||
| 241 | local _u5e93_u5b58 = { | ||
| 242 | ["设备"] = { | ||
| 243 | "剑", | ||
| 244 | "盾" | ||
| 245 | }, | ||
| 246 | ["物品"] = { | ||
| 247 | { | ||
| 248 | ["名字"] = "药水", | ||
| 249 | ["计数"] = 10 | ||
| 250 | }, | ||
| 251 | { | ||
| 252 | ["名字"] = "面包", | ||
| 253 | ["计数"] = 3 | ||
| 254 | } | ||
| 255 | } | ||
| 256 | } | ||
| 257 | local _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 | } | ||
| 294 | local _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 | } | ||
| 314 | local _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 | } | ||
| 357 | local _u53d8_u91cftb | ||
| 358 | do | ||
| 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 | ||
| 370 | end | ||
| 371 | local tb_u6df7_u5408 | ||
| 372 | do | ||
| 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 | ||
| 415 | end | ||
| 416 | local tb_u6df7_u5408A | ||
| 417 | do | ||
| 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 | ||
| 440 | end | ||
| 441 | local tb_u6df7_u5408B | ||
| 442 | do | ||
| 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 | ||
| 494 | end | ||
| 495 | local _u6a21_u677f <const> = { | ||
| 496 | foo = "你好", | ||
| 497 | bar = "世界", | ||
| 498 | baz = "!" | ||
| 499 | } | ||
| 500 | local _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 | ||
| 513 | end)() | ||
| 514 | local _u4e13_u95e8_u5316B | ||
| 515 | do | ||
| 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 | ||
| 532 | end | ||
| 533 | local _u90e8_u5206 = { | ||
| 534 | "肩膀", | ||
| 535 | "膝盖" | ||
| 536 | } | ||
| 537 | local _u6b4c_u8bcd | ||
| 538 | do | ||
| 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 | ||
| 554 | end | ||
| 555 | local 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 | ||
| 593 | end)(...)) | ||
| 594 | return 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 @@ | |||
| 1 | xpcall(_u51fd_u6570, function(_u9519_u8bef) | ||
| 2 | return _u6253_u5370(_u9519_u8bef) | ||
| 3 | end, 1, 2, 3) | ||
| 4 | xpcall(_u51fd_u6570, function(_u9519_u8bef) | ||
| 5 | return _u6253_u5370(_u9519_u8bef) | ||
| 6 | end, 1, 2, 3) | ||
| 7 | pcall(function() | ||
| 8 | _u6253_u5370("正在try") | ||
| 9 | return _u51fd_u6570(1, 2, 3) | ||
| 10 | end) | ||
| 11 | do | ||
| 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) | ||
| 16 | end | ||
| 17 | pcall(_u8868["函数"]) | ||
| 18 | pcall(_u8868["函数"]) | ||
| 19 | pcall(_u8868["函数"]) | ||
| 20 | pcall((_u8868["函数"])) | ||
| 21 | pcall(((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 | ||
| 27 | end)()), 1, 2, 3) | ||
| 28 | pcall(_u8868["函数"], 1) | ||
| 29 | pcall(_u8868["函数"], 1) | ||
| 30 | if (xpcall(_u51fd_u6570, function(_u9519_u8bef) | ||
| 31 | return _u6253_u5370(_u9519_u8bef) | ||
| 32 | end, 1)) then | ||
| 33 | _u6253_u5370("好的") | ||
| 34 | end | ||
| 35 | if xpcall((_u51fd_u6570), function(_u9519_u8bef) | ||
| 36 | return _u6253_u5370(_u9519_u8bef) | ||
| 37 | end, 1) then | ||
| 38 | _u6253_u5370("好的") | ||
| 39 | end | ||
| 40 | do | ||
| 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 | ||
| 56 | end | ||
| 57 | do | ||
| 58 | pcall(_u51fd_u6570, 1, 2, 3) | ||
| 59 | pcall(_u51fd_u6570, 1, 2, 3) | ||
| 60 | end | ||
| 61 | return 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 @@ | |||
| 1 | if _u53d8_u91cfa then | ||
| 2 | if not _u53d8_u91cfb then | ||
| 3 | return _u6253_u5370("嗨") | ||
| 4 | elseif _u53d8_u91cfc then | ||
| 5 | return _u6253_u5370("不嗨") | ||
| 6 | end | ||
| 7 | end | ||
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 @@ | |||
| 1 | local _u4f60_u597d = "你好" | ||
| 2 | local _u4e16_u754c = "世界" | ||
| 3 | local _ | ||
| 4 | _ = function() | ||
| 5 | local _u4f60_u597d = 3223 | ||
| 6 | end | ||
| 7 | _ = function(_u53c2_u6570a) | ||
| 8 | local _u4f60_u597d = 3223 | ||
| 9 | _u53c2_u6570a = 323 | ||
| 10 | end | ||
| 11 | _ = function(_u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c) | ||
| 12 | _u53c2_u6570a, _u53c2_u6570b, _u53c2_u6570c = 1, 2, 3 | ||
| 13 | local _u4e16_u754c = 12321 | ||
| 14 | end | ||
| 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" | ||
| 20 | end | ||
| 21 | _ = function() | ||
| 22 | local _u4f60_u597d = _u4f60_u597d or 2 | ||
| 23 | end | ||
| 24 | do | ||
| 25 | local _u53d8_u91cfa = { } | ||
| 26 | _(function() | ||
| 27 | local _u5143_u7d20x, _u5143_u7d20y = _u53d8_u91cfa[1], _u53d8_u91cfa[2] | ||
| 28 | end) | ||
| 29 | end | ||
| 30 | return 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 @@ | |||
| 1 | local _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 | ||
| 301 | end | ||
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 @@ | |||
| 1 | local _ = { | ||
| 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 | } | ||
| 64 | local _u53d8_u91cfx = { | ||
| 65 | _u4f60_u597d(1, 2, 3, 4, 5, 6, 7), | ||
| 66 | 1, | ||
| 67 | 2, | ||
| 68 | 3, | ||
| 69 | 4 | ||
| 70 | } | ||
| 71 | if _u4f60_u597d(1, 2, 3, _u4e16_u754c, _u4e16_u754c) then | ||
| 72 | _u6253_u5370("你好") | ||
| 73 | end | ||
| 74 | if _u4f60_u597d(1, 2, 3, _u4e16_u754c, _u4e16_u754c) then | ||
| 75 | _u6253_u5370("你好") | ||
| 76 | end | ||
| 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) | ||
| 80 | local v | ||
| 81 | v = function() | ||
| 82 | return _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc | ||
| 83 | end | ||
| 84 | local v1, v2, v3 | ||
| 85 | v1, v2, v3 = function() | ||
| 86 | return _u53d8_u91cfa | ||
| 87 | end, _u53d8_u91cfb, _u53d8_u91cfc | ||
| 88 | local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc, _u53d8_u91cfd, _u53d8_u91cfe, _u53d8_u91cff = 1, f2({ | ||
| 89 | abc = abc | ||
| 90 | }), 3, 4, _u51fd_u65705(abc), 6 | ||
| 91 | for _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc in pairs(_u5bf9_u8c61tb) do | ||
| 92 | _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc) | ||
| 93 | end | ||
| 94 | for i = 1, 10, -1 do | ||
| 95 | _u6253_u5370(i) | ||
| 96 | end | ||
| 97 | local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc | ||
| 98 | return 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 @@ | |||
| 1 | do | ||
| 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 | ||
| 10 | end | ||
| 11 | do | ||
| 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 | ||
| 22 | end | ||
| 23 | do | ||
| 24 | local _u6ecb_u6ecb_u6ecb | ||
| 25 | do | ||
| 26 | local _with_0 = _u4e1c_u897f | ||
| 27 | _with_0["设置状态"]("你好 世界") | ||
| 28 | _u6ecb_u6ecb_u6ecb = _with_0 | ||
| 29 | end | ||
| 30 | end | ||
| 31 | do | ||
| 32 | local _u53d8_u91cfx = 5 + (function() | ||
| 33 | local _with_0 = _u67d0_u4e8b() | ||
| 34 | _with_0["写"](_with_0, "你好 世界") | ||
| 35 | return _with_0 | ||
| 36 | end)() | ||
| 37 | end | ||
| 38 | do | ||
| 39 | local _u53d8_u91cfx = { | ||
| 40 | ["你好"] = (function() | ||
| 41 | local _with_0 = _u597d_u7684 | ||
| 42 | _with_0["确定"](_with_0) | ||
| 43 | return _with_0 | ||
| 44 | end)() | ||
| 45 | } | ||
| 46 | end | ||
| 47 | do | ||
| 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 | ||
| 56 | end | ||
| 57 | do | ||
| 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 | ||
| 90 | end | ||
| 91 | do | ||
| 92 | local _u53d8_u91cfx = "你好" | ||
| 93 | _u53d8_u91cfx["大写"](_u53d8_u91cfx) | ||
| 94 | end | ||
| 95 | do | ||
| 96 | do | ||
| 97 | local _u53d8_u91cfk = "乔" | ||
| 98 | _u6253_u5370(_u53d8_u91cfk["大写"](_u53d8_u91cfk)) | ||
| 99 | end | ||
| 100 | end | ||
| 101 | do | ||
| 102 | do | ||
| 103 | local _u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc = "", "", "" | ||
| 104 | _u6253_u5370(_u53d8_u91cfa["大写"](_u53d8_u91cfa)) | ||
| 105 | end | ||
| 106 | end | ||
| 107 | do | ||
| 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 | ||
| 114 | end | ||
| 115 | do | ||
| 116 | do | ||
| 117 | local _with_0 = _u53d8_u91cfj | ||
| 118 | _u6253_u5370(_with_0["大写"](_with_0)) | ||
| 119 | end | ||
| 120 | end | ||
| 121 | do | ||
| 122 | do | ||
| 123 | local _with_0 = "乔" | ||
| 124 | _u53d8_u91cfk["变量j"] = _with_0 | ||
| 125 | _u6253_u5370(_with_0["大写"](_with_0)) | ||
| 126 | end | ||
| 127 | end | ||
| 128 | do | ||
| 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 | ||
| 137 | end | ||
| 138 | do | ||
| 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 | ||
| 147 | end | ||
| 148 | do | ||
| 149 | local _ | ||
| 150 | _ = function() | ||
| 151 | local _with_0 = _u55e8 | ||
| 152 | return _with_0.a, _with_0.b | ||
| 153 | end | ||
| 154 | end | ||
| 155 | do | ||
| 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 | ||
| 161 | end | ||
| 162 | do | ||
| 163 | do | ||
| 164 | local _with_0 = _u7238_u7238 | ||
| 165 | _with_0["如果"]("是的") | ||
| 166 | local _u53d8_u91cfy = _with_0["结束"]["函数"] | ||
| 167 | end | ||
| 168 | end | ||
| 169 | do | ||
| 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 | ||
| 194 | end | ||
| 195 | do | ||
| 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 | ||
| 208 | end | ||
| 209 | do | ||
| 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 | ||
| 221 | end | ||
| 222 | return nil | ||
