aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/unicode
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2025-04-11 17:33:12 +0800
committerLi Jin <dragon-fly@qq.com>2025-04-11 17:33:12 +0800
commite96308912e2e04535836a2c282b0a7300d2d81fd (patch)
tree9c6f55dbce6193dac6f78dad94f76ad1c0a6ef1a /spec/outputs/unicode
parent9750786a5c03b5ce3ea22b240d1b3cd34990856b (diff)
downloadyuescript-0.27.4.tar.gz
yuescript-0.27.4.tar.bz2
yuescript-0.27.4.zip
Fixing issue #206.v0.27.4
Diffstat (limited to '')
-rw-r--r--spec/outputs/unicode/assign.lua6
-rw-r--r--spec/outputs/unicode/attrib.lua18
-rw-r--r--spec/outputs/unicode/do.lua6
-rw-r--r--spec/outputs/unicode/macro.lua113
-rw-r--r--spec/outputs/unicode/syntax.lua8
-rw-r--r--spec/outputs/unicode/try_catch.lua10
6 files changed, 101 insertions, 60 deletions
diff --git a/spec/outputs/unicode/assign.lua b/spec/outputs/unicode/assign.lua
index bf43953..d4ad56a 100644
--- a/spec/outputs/unicode/assign.lua
+++ b/spec/outputs/unicode/assign.lua
@@ -36,10 +36,10 @@ local _u53d8_u91cfx
36do 36do
37 local _u51fd_u6570 = _u83b7_u53d6_u5904_u7406_u51fd_u6570() 37 local _u51fd_u6570 = _u83b7_u53d6_u5904_u7406_u51fd_u6570()
38 if _u51fd_u6570 then 38 if _u51fd_u6570 then
39 do 39 _u53d8_u91cfx = ((function()
40 _u51fd_u6570() 40 _u51fd_u6570()
41 _u53d8_u91cfx = 123 41 return 123
42 end 42 end)())
43 end 43 end
44end 44end
45local _anon_func_0 = function(_u6253_u5370) 45local _anon_func_0 = function(_u6253_u5370)
diff --git a/spec/outputs/unicode/attrib.lua b/spec/outputs/unicode/attrib.lua
index 1c48de4..5e5bb99 100644
--- a/spec/outputs/unicode/attrib.lua
+++ b/spec/outputs/unicode/attrib.lua
@@ -48,17 +48,21 @@ do
48 end 48 end
49 local _u5173_u95ed_u53d8_u91cfb 49 local _u5173_u95ed_u53d8_u91cfb
50 if not false then 50 if not false then
51 if _u6761_u4ef6x then 51 _u5173_u95ed_u53d8_u91cfb = ((function()
52 _u5173_u95ed_u53d8_u91cfb = 1 52 if _u6761_u4ef6x then
53 end 53 return 1
54 end
55 end)())
54 end 56 end
55 local _close_0 <close> = _u5173_u95ed_u53d8_u91cfb 57 local _close_0 <close> = _u5173_u95ed_u53d8_u91cfb
56 local _u5e38_u91cfc 58 local _u5e38_u91cfc
57 if true then 59 if true then
58 local _exp_0 = _u6761_u4ef6x 60 _u5e38_u91cfc = ((function()
59 if "abc" == _exp_0 then 61 local _exp_0 = _u6761_u4ef6x
60 _u5e38_u91cfc = 998 62 if "abc" == _exp_0 then
61 end 63 return 998
64 end
65 end)())
62 end 66 end
63 local _u5173_u95ed_u53d8_u91cfd 67 local _u5173_u95ed_u53d8_u91cfd
64 if (function() 68 if (function()
diff --git a/spec/outputs/unicode/do.lua b/spec/outputs/unicode/do.lua
index f9c3079..7bf1da3 100644
--- a/spec/outputs/unicode/do.lua
+++ b/spec/outputs/unicode/do.lua
@@ -32,10 +32,10 @@ local _u53d8_u91cft = {
32} 32}
33return function(_u53c2_u6570y, _u53c2_u6570k) 33return function(_u53c2_u6570y, _u53c2_u6570k)
34 if _u53c2_u6570y == nil then 34 if _u53c2_u6570y == nil then
35 do 35 _u53c2_u6570y = ((function()
36 _u53d8_u91cfx = 10 + 2 36 _u53d8_u91cfx = 10 + 2
37 _u53c2_u6570y = _u53d8_u91cfx 37 return _u53d8_u91cfx
38 end 38 end)())
39 end 39 end
40 if _u53c2_u6570k == nil then 40 if _u53c2_u6570k == nil then
41 do 41 do
diff --git a/spec/outputs/unicode/macro.lua b/spec/outputs/unicode/macro.lua
index 099080f..b14f571 100644
--- a/spec/outputs/unicode/macro.lua
+++ b/spec/outputs/unicode/macro.lua
@@ -215,52 +215,85 @@ do
215-- 这有个注释 215-- 这有个注释
216end 216end
217local _ = require('下划线') 217local _ = require('下划线')
218local _call_0 = (_({ 218local _anon_func_0 = function(_)
219 1, 219 do
220 2, 220 local _call_0 = (_({
221 3, 221 1,
222 4, 222 2,
223 -2, 223 3,
224 3 224 4,
225})) 225 -2,
226_call_0 = _call_0["链"](_call_0) 226 3
227_call_0 = _call_0["映射"](_call_0, function(self) 227 }))
228 return self * 2 228 return _call_0["链"](_call_0)
229end) 229 end
230_call_0 = _call_0["过滤"](_call_0, function(self) 230end
231 return self > 3 231local _call_0 = ((function()
232end) 232 local _call_0 = ((function()
233local _u7ed3_u679ca = _call_0["取值"](_call_0) 233 local _call_0 = (_anon_func_0(_))
234do 234 return _call_0["映射"](_call_0, function(self)
235 local _call_1 = (_({ 235 return self * 2
236 1, 236 end)
237 2, 237 end)())
238 3, 238 return _call_0["过滤"](_call_0, function(self)
239 4,
240 -2,
241 3
242 }))
243 _call_1 = _call_1["链"](_call_1)
244 _call_1 = _call_1["映射"](_call_1, function(self)
245 return self * 2
246 end)
247 _call_1 = _call_1["过滤"](_call_1, function(self)
248 return self > 3 239 return self > 3
249 end) 240 end)
241end)())
242local _u7ed3_u679ca = _call_0["取值"](_call_0)
243local _anon_func_1 = function(_)
244 do
245 local _call_1 = (_({
246 1,
247 2,
248 3,
249 4,
250 -2,
251 3
252 }))
253 return _call_1["链"](_call_1)
254 end
255end
256do
257 local _call_1 = ((function()
258 local _call_1 = ((function()
259 local _call_1 = (_anon_func_1(_))
260 return _call_1["映射"](_call_1, function(self)
261 return self * 2
262 end)
263 end)())
264 return _call_1["过滤"](_call_1, function(self)
265 return self > 3
266 end)
267 end)())
250 _call_1["每一个"](_call_1, function(self) 268 _call_1["每一个"](_call_1, function(self)
251 return _u6253_u5370(self) 269 return _u6253_u5370(self)
252 end) 270 end)
253end 271end
254local _call_1 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] 272local _anon_func_2 = function(_u539f_u70b9)
255_call_1 = _call_1["父节点"](_call_1) 273 do
256_call_1 = _call_1["后代"](_call_1) 274 local _call_1 = _u539f_u70b9["变换"]["根节点"]["游戏对象"]
257_call_1 = _call_1["选择启用"](_call_1) 275 return _call_1["父节点"](_call_1)
258_call_1 = _call_1["选择可见"](_call_1) 276 end
259_call_1 = _call_1["标签等于"](_call_1, "fx") 277end
260_call_1 = _call_1["其中"](_call_1, function(x) 278local _call_1 = ((function()
261 local _call_2 = x["名称"] 279 local _call_1 = ((function()
262 return _call_2["结尾为"](_call_2, "(克隆)") 280 local _call_1 = ((function()
263end) 281 local _call_1 = ((function()
282 local _call_1 = ((function()
283 local _call_1 = (_anon_func_2(_u539f_u70b9))
284 return _call_1["后代"](_call_1)
285 end)())
286 return _call_1["选择启用"](_call_1)
287 end)())
288 return _call_1["选择可见"](_call_1)
289 end)())
290 return _call_1["标签等于"](_call_1, "fx")
291 end)())
292 return _call_1["其中"](_call_1, function(x)
293 local _call_2 = x["名称"]
294 return _call_2["结尾为"](_call_2, "(克隆)")
295 end)
296end)())
264_u7ed3_u679c = _call_1["摧毁"](_call_1) 297_u7ed3_u679c = _call_1["摧毁"](_call_1)
265do 298do
266 do 299 do
diff --git a/spec/outputs/unicode/syntax.lua b/spec/outputs/unicode/syntax.lua
index ea97bb9..1984f40 100644
--- a/spec/outputs/unicode/syntax.lua
+++ b/spec/outputs/unicode/syntax.lua
@@ -258,9 +258,11 @@ _u53d8_u91cfx = 0
258local _list_0 = _u503c 258local _list_0 = _u503c
259for _index_0 = 1, #_list_0 do 259for _index_0 = 1, #_list_0 do
260 local _u53d8_u91cfv = _list_0[_index_0] 260 local _u53d8_u91cfv = _list_0[_index_0]
261 if ntype(_u53d8_u91cfv) == "函数定义" then 261 _ = ((function()
262 _ = _u53d8_u91cfx + 1 262 if ntype(_u53d8_u91cfv) == "函数定义" then
263 end 263 return _u53d8_u91cfx + 1
264 end
265 end)())
264end 266end
265_u4f60_u597d = { 267_u4f60_u597d = {
266 ["某物"] = _u4e16_u754c, 268 ["某物"] = _u4e16_u754c,
diff --git a/spec/outputs/unicode/try_catch.lua b/spec/outputs/unicode/try_catch.lua
index 22f29f9..f8c7849 100644
--- a/spec/outputs/unicode/try_catch.lua
+++ b/spec/outputs/unicode/try_catch.lua
@@ -32,11 +32,13 @@ pcall(function()
32 return _u8868["函数"]() 32 return _u8868["函数"]()
33end) 33end)
34pcall(function() 34pcall(function()
35 return _u8868["函数"]() 35 return (_u8868["函数"]())
36end) 36end)
37pcall(function() 37pcall(function()
38 local _call_0 = _u8868 38 return ((function()
39 return _call_0["函数"](_call_0, 1, 2, 3) 39 local _call_0 = _u8868
40 return _call_0["函数"](_call_0, 1, 2, 3)
41 end)())
40end) 42end)
41pcall(function() 43pcall(function()
42 return _u8868["函数"](1) 44 return _u8868["函数"](1)
@@ -52,7 +54,7 @@ end)) then
52 _u6253_u5370("好的") 54 _u6253_u5370("好的")
53end 55end
54if xpcall(function() 56if xpcall(function()
55 return _u51fd_u6570(1) 57 return (_u51fd_u6570(1))
56end, function(_u9519_u8bef) 58end, function(_u9519_u8bef)
57 return _u6253_u5370(_u9519_u8bef) 59 return _u6253_u5370(_u9519_u8bef)
58end) then 60end) then