diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-04-11 17:33:12 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-04-11 17:33:12 +0800 |
| commit | e96308912e2e04535836a2c282b0a7300d2d81fd (patch) | |
| tree | 9c6f55dbce6193dac6f78dad94f76ad1c0a6ef1a /spec/outputs/unicode | |
| parent | 9750786a5c03b5ce3ea22b240d1b3cd34990856b (diff) | |
| download | yuescript-e96308912e2e04535836a2c282b0a7300d2d81fd.tar.gz yuescript-e96308912e2e04535836a2c282b0a7300d2d81fd.tar.bz2 yuescript-e96308912e2e04535836a2c282b0a7300d2d81fd.zip | |
Fixing issue #206.v0.27.4
Diffstat (limited to 'spec/outputs/unicode')
| -rw-r--r-- | spec/outputs/unicode/assign.lua | 6 | ||||
| -rw-r--r-- | spec/outputs/unicode/attrib.lua | 18 | ||||
| -rw-r--r-- | spec/outputs/unicode/do.lua | 6 | ||||
| -rw-r--r-- | spec/outputs/unicode/macro.lua | 113 | ||||
| -rw-r--r-- | spec/outputs/unicode/syntax.lua | 8 | ||||
| -rw-r--r-- | spec/outputs/unicode/try_catch.lua | 10 |
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 | |||
| 36 | do | 36 | do |
| 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 |
| 44 | end | 44 | end |
| 45 | local _anon_func_0 = function(_u6253_u5370) | 45 | local _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 | } |
| 33 | return function(_u53c2_u6570y, _u53c2_u6570k) | 33 | return 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 | -- 这有个注释 |
| 216 | end | 216 | end |
| 217 | local _ = require('下划线') | 217 | local _ = require('下划线') |
| 218 | local _call_0 = (_({ | 218 | local _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) |
| 229 | end) | 229 | end |
| 230 | _call_0 = _call_0["过滤"](_call_0, function(self) | 230 | end |
| 231 | return self > 3 | 231 | local _call_0 = ((function() |
| 232 | end) | 232 | local _call_0 = ((function() |
| 233 | local _u7ed3_u679ca = _call_0["取值"](_call_0) | 233 | local _call_0 = (_anon_func_0(_)) |
| 234 | do | 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) |
| 241 | end)()) | ||
| 242 | local _u7ed3_u679ca = _call_0["取值"](_call_0) | ||
| 243 | local _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 | ||
| 255 | end | ||
| 256 | do | ||
| 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) |
| 253 | end | 271 | end |
| 254 | local _call_1 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] | 272 | local _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") | 277 | end |
| 260 | _call_1 = _call_1["其中"](_call_1, function(x) | 278 | local _call_1 = ((function() |
| 261 | local _call_2 = x["名称"] | 279 | local _call_1 = ((function() |
| 262 | return _call_2["结尾为"](_call_2, "(克隆)") | 280 | local _call_1 = ((function() |
| 263 | end) | 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) | ||
| 296 | end)()) | ||
| 264 | _u7ed3_u679c = _call_1["摧毁"](_call_1) | 297 | _u7ed3_u679c = _call_1["摧毁"](_call_1) |
| 265 | do | 298 | do |
| 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 | |||
| 258 | local _list_0 = _u503c | 258 | local _list_0 = _u503c |
| 259 | for _index_0 = 1, #_list_0 do | 259 | for _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)()) | ||
| 264 | end | 266 | end |
| 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["函数"]() |
| 33 | end) | 33 | end) |
| 34 | pcall(function() | 34 | pcall(function() |
| 35 | return _u8868["函数"]() | 35 | return (_u8868["函数"]()) |
| 36 | end) | 36 | end) |
| 37 | pcall(function() | 37 | pcall(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)()) | ||
| 40 | end) | 42 | end) |
| 41 | pcall(function() | 43 | pcall(function() |
| 42 | return _u8868["函数"](1) | 44 | return _u8868["函数"](1) |
| @@ -52,7 +54,7 @@ end)) then | |||
| 52 | _u6253_u5370("好的") | 54 | _u6253_u5370("好的") |
| 53 | end | 55 | end |
| 54 | if xpcall(function() | 56 | if xpcall(function() |
| 55 | return _u51fd_u6570(1) | 57 | return (_u51fd_u6570(1)) |
| 56 | end, function(_u9519_u8bef) | 58 | end, function(_u9519_u8bef) |
| 57 | return _u6253_u5370(_u9519_u8bef) | 59 | return _u6253_u5370(_u9519_u8bef) |
| 58 | end) then | 60 | end) then |
