diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-05-28 18:20:16 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-05-28 18:20:16 +0800 |
| commit | 5604bbbb80bfcedb4a9085b90864e221f8104b33 (patch) | |
| tree | 8828cddb1b0fe0ca734d6209507bdbda3133f48d /spec/outputs/unicode | |
| parent | 87267ca9e93606b70bdc0397349b176b8d142514 (diff) | |
| download | yuescript-5604bbbb80bfcedb4a9085b90864e221f8104b33.tar.gz yuescript-5604bbbb80bfcedb4a9085b90864e221f8104b33.tar.bz2 yuescript-5604bbbb80bfcedb4a9085b90864e221f8104b33.zip | |
Added `try!` syntax.
Diffstat (limited to 'spec/outputs/unicode')
| -rw-r--r-- | spec/outputs/unicode/assign.lua | 6 | ||||
| -rw-r--r-- | spec/outputs/unicode/macro.lua | 46 | ||||
| -rw-r--r-- | spec/outputs/unicode/multiline_chain.lua | 6 | ||||
| -rw-r--r-- | spec/outputs/unicode/syntax.lua | 6 | ||||
| -rw-r--r-- | spec/outputs/unicode/vararg.lua | 28 |
5 files changed, 34 insertions, 58 deletions
diff --git a/spec/outputs/unicode/assign.lua b/spec/outputs/unicode/assign.lua index d4ad56a..e00d016 100644 --- a/spec/outputs/unicode/assign.lua +++ b/spec/outputs/unicode/assign.lua | |||
| @@ -43,10 +43,8 @@ do | |||
| 43 | end | 43 | end |
| 44 | end | 44 | end |
| 45 | local _anon_func_0 = function(_u6253_u5370) | 45 | local _anon_func_0 = function(_u6253_u5370) |
| 46 | do | 46 | _u6253_u5370(123) |
| 47 | _u6253_u5370(123) | 47 | return { } |
| 48 | return { } | ||
| 49 | end | ||
| 50 | end | 48 | end |
| 51 | return __u65e0_u6548_u53d8_u91cf(function() | 49 | return __u65e0_u6548_u53d8_u91cf(function() |
| 52 | setmetatable(a_u53d8_u91cf, _anon_func_0(_u6253_u5370)) | 50 | setmetatable(a_u53d8_u91cf, _anon_func_0(_u6253_u5370)) |
diff --git a/spec/outputs/unicode/macro.lua b/spec/outputs/unicode/macro.lua index 3b9327a..b4e78cd 100644 --- a/spec/outputs/unicode/macro.lua +++ b/spec/outputs/unicode/macro.lua | |||
| @@ -216,17 +216,15 @@ do | |||
| 216 | end | 216 | end |
| 217 | local _ = require('下划线') | 217 | local _ = require('下划线') |
| 218 | local _anon_func_0 = function(_) | 218 | local _anon_func_0 = function(_) |
| 219 | do | 219 | local _call_0 = (_({ |
| 220 | local _call_0 = (_({ | 220 | 1, |
| 221 | 1, | 221 | 2, |
| 222 | 2, | 222 | 3, |
| 223 | 3, | 223 | 4, |
| 224 | 4, | 224 | -2, |
| 225 | -2, | 225 | 3 |
| 226 | 3 | 226 | })) |
| 227 | })) | 227 | return _call_0["链"](_call_0) |
| 228 | return _call_0["链"](_call_0) | ||
| 229 | end | ||
| 230 | end | 228 | end |
| 231 | local _call_0 = ((function() | 229 | local _call_0 = ((function() |
| 232 | local _call_0 = ((function() | 230 | local _call_0 = ((function() |
| @@ -241,17 +239,15 @@ local _call_0 = ((function() | |||
| 241 | end)()) | 239 | end)()) |
| 242 | local _u7ed3_u679ca = _call_0["取值"](_call_0) | 240 | local _u7ed3_u679ca = _call_0["取值"](_call_0) |
| 243 | local _anon_func_1 = function(_) | 241 | local _anon_func_1 = function(_) |
| 244 | do | 242 | local _call_1 = (_({ |
| 245 | local _call_1 = (_({ | 243 | 1, |
| 246 | 1, | 244 | 2, |
| 247 | 2, | 245 | 3, |
| 248 | 3, | 246 | 4, |
| 249 | 4, | 247 | -2, |
| 250 | -2, | 248 | 3 |
| 251 | 3 | 249 | })) |
| 252 | })) | 250 | return _call_1["链"](_call_1) |
| 253 | return _call_1["链"](_call_1) | ||
| 254 | end | ||
| 255 | end | 251 | end |
| 256 | do | 252 | do |
| 257 | local _call_1 = ((function() | 253 | local _call_1 = ((function() |
| @@ -270,10 +266,8 @@ do | |||
| 270 | end) | 266 | end) |
| 271 | end | 267 | end |
| 272 | local _anon_func_2 = function(_u539f_u70b9) | 268 | local _anon_func_2 = function(_u539f_u70b9) |
| 273 | do | 269 | local _call_1 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] |
| 274 | local _call_1 = _u539f_u70b9["变换"]["根节点"]["游戏对象"] | 270 | return _call_1["父节点"](_call_1) |
| 275 | return _call_1["父节点"](_call_1) | ||
| 276 | end | ||
| 277 | end | 271 | end |
| 278 | local _call_1 = ((function() | 272 | local _call_1 = ((function() |
| 279 | local _call_1 = ((function() | 273 | local _call_1 = ((function() |
diff --git a/spec/outputs/unicode/multiline_chain.lua b/spec/outputs/unicode/multiline_chain.lua index c1da13f..61e7057 100644 --- a/spec/outputs/unicode/multiline_chain.lua +++ b/spec/outputs/unicode/multiline_chain.lua | |||
| @@ -59,10 +59,8 @@ _u51fd_u6570 = function() | |||
| 59 | return _accum_0 | 59 | return _accum_0 |
| 60 | end | 60 | end |
| 61 | local _anon_func_0 = function(_u53d8_u91cfa) | 61 | local _anon_func_0 = function(_u53d8_u91cfa) |
| 62 | do | 62 | local _call_1 = _u53d8_u91cfa |
| 63 | local _call_1 = _u53d8_u91cfa | 63 | return (_call_1["变量b"](_call_1, 123))["变量c"]("abc") |
| 64 | return (_call_1["变量b"](_call_1, 123))["变量c"]("abc") | ||
| 65 | end | ||
| 66 | end | 64 | end |
| 67 | local _u51fd_u65701 | 65 | local _u51fd_u65701 |
| 68 | _u51fd_u65701 = function() | 66 | _u51fd_u65701 = function() |
diff --git a/spec/outputs/unicode/syntax.lua b/spec/outputs/unicode/syntax.lua index 1984f40..a13302b 100644 --- a/spec/outputs/unicode/syntax.lua +++ b/spec/outputs/unicode/syntax.lua | |||
| @@ -286,10 +286,8 @@ _ = 5 - _u4ec0_u4e48(_u65e0_u804a) | |||
| 286 | _u4ec0_u4e48(_u65e0_u804a - 5) | 286 | _u4ec0_u4e48(_u65e0_u804a - 5) |
| 287 | _u53d8_u91cfx = _u4f60_u597d - _u4e16_u754c - _u67d0_u7269 | 287 | _u53d8_u91cfx = _u4f60_u597d - _u4e16_u754c - _u67d0_u7269 |
| 288 | local _anon_func_0 = function(_u4ec0_u4e48) | 288 | local _anon_func_0 = function(_u4ec0_u4e48) |
| 289 | do | 289 | local _call_8 = _u4ec0_u4e48 |
| 290 | local _call_8 = _u4ec0_u4e48 | 290 | return _call_8["酷"](_call_8, 100) |
| 291 | return _call_8["酷"](_call_8, 100) | ||
| 292 | end | ||
| 293 | end | 291 | end |
| 294 | (function(_u67d0_u7269) | 292 | (function(_u67d0_u7269) |
| 295 | if _u67d0_u7269 == nil then | 293 | if _u67d0_u7269 == nil then |
diff --git a/spec/outputs/unicode/vararg.lua b/spec/outputs/unicode/vararg.lua index b837006..fc894ff 100644 --- a/spec/outputs/unicode/vararg.lua +++ b/spec/outputs/unicode/vararg.lua | |||
| @@ -125,14 +125,10 @@ local _anon_func_11 = function(_u9879_u76ee, ...) | |||
| 125 | return _tbl_0 | 125 | return _tbl_0 |
| 126 | end | 126 | end |
| 127 | local _anon_func_12 = function(_u51fd_u6570) | 127 | local _anon_func_12 = function(_u51fd_u6570) |
| 128 | do | 128 | return _u51fd_u6570() |
| 129 | return _u51fd_u6570() | ||
| 130 | end | ||
| 131 | end | 129 | end |
| 132 | local _anon_func_13 = function(_u51fd_u6570, ...) | 130 | local _anon_func_13 = function(_u51fd_u6570, ...) |
| 133 | do | 131 | return _u51fd_u6570(...) |
| 134 | return _u51fd_u6570(...) | ||
| 135 | end | ||
| 136 | end | 132 | end |
| 137 | local _anon_func_14 = function(_u51fd_u6570) | 133 | local _anon_func_14 = function(_u51fd_u6570) |
| 138 | local _accum_0 = { } | 134 | local _accum_0 = { } |
| @@ -195,15 +191,11 @@ local _anon_func_23 = function(_u51fd_u6570, ...) | |||
| 195 | return nil | 191 | return nil |
| 196 | end | 192 | end |
| 197 | local _anon_func_24 = function(_u6253_u5370, select, ...) | 193 | local _anon_func_24 = function(_u6253_u5370, select, ...) |
| 198 | do | 194 | _u6253_u5370(select("#", ...)) |
| 199 | _u6253_u5370(select("#", ...)) | 195 | return _u6253_u5370(...) |
| 200 | return _u6253_u5370(...) | ||
| 201 | end | ||
| 202 | end | 196 | end |
| 203 | local _anon_func_25 = function(_u6253_u5370, ...) | 197 | local _anon_func_25 = function(_u6253_u5370, ...) |
| 204 | do | 198 | return _u6253_u5370(...) |
| 205 | return _u6253_u5370(...) | ||
| 206 | end | ||
| 207 | end | 199 | end |
| 208 | local _anon_func_26 = function(_u53d8_u91cfx, _u8868, _u88682) | 200 | local _anon_func_26 = function(_u53d8_u91cfx, _u8868, _u88682) |
| 209 | if 1 == _u53d8_u91cfx then | 201 | if 1 == _u53d8_u91cfx then |
| @@ -214,9 +206,7 @@ local _anon_func_26 = function(_u53d8_u91cfx, _u8868, _u88682) | |||
| 214 | end | 206 | end |
| 215 | end | 207 | end |
| 216 | local _anon_func_27 = function(_u6253_u5370, ...) | 208 | local _anon_func_27 = function(_u6253_u5370, ...) |
| 217 | do | 209 | return _u6253_u5370(...) |
| 218 | return _u6253_u5370(...) | ||
| 219 | end | ||
| 220 | end | 210 | end |
| 221 | local _anon_func_28 = function(_u6761_u4ef6) | 211 | local _anon_func_28 = function(_u6761_u4ef6) |
| 222 | if _u6761_u4ef6 then | 212 | if _u6761_u4ef6 then |
| @@ -224,10 +214,8 @@ local _anon_func_28 = function(_u6761_u4ef6) | |||
| 224 | end | 214 | end |
| 225 | end | 215 | end |
| 226 | local _anon_func_29 = function(_u6253_u5370, _arg_0, ...) | 216 | local _anon_func_29 = function(_u6253_u5370, _arg_0, ...) |
| 227 | do | 217 | local _u8868 = _arg_0 |
| 228 | local _u8868 = _arg_0 | 218 | return _u6253_u5370(...) |
| 229 | return _u6253_u5370(...) | ||
| 230 | end | ||
| 231 | end | 219 | end |
| 232 | local _u8fde_u63a5 | 220 | local _u8fde_u63a5 |
| 233 | _u8fde_u63a5 = function(...) | 221 | _u8fde_u63a5 = function(...) |
