diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-10-22 00:55:02 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-10-22 00:55:02 +0800 |
| commit | 652a8839f885b73fff57942a9db8b26e9cb5233b (patch) | |
| tree | 0b24bb5610823a831ec0addbba37cb6200203b27 /spec/outputs/unicode | |
| parent | f61a4a1d9a1b979b8a0c2e8a9c194a284f42220f (diff) | |
| download | yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.tar.gz yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.tar.bz2 yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.zip | |
fixing issues from #152.
Diffstat (limited to 'spec/outputs/unicode')
| -rw-r--r-- | spec/outputs/unicode/cond.lua | 17 | ||||
| -rw-r--r-- | spec/outputs/unicode/in_expression.lua | 31 |
2 files changed, 20 insertions, 28 deletions
diff --git a/spec/outputs/unicode/cond.lua b/spec/outputs/unicode/cond.lua index f972dea..9a4ccb9 100644 --- a/spec/outputs/unicode/cond.lua +++ b/spec/outputs/unicode/cond.lua | |||
| @@ -351,4 +351,21 @@ do | |||
| 351 | _u53d8_u91cfv = 2 | 351 | _u53d8_u91cfv = 2 |
| 352 | end | 352 | end |
| 353 | end | 353 | end |
| 354 | do | ||
| 355 | local _u94fe_u5f0f_u6bd4_u8f83 = 1 < 2 and 2 <= 2 and 2 < 3 and 3 == 3 and 3 > 2 and 2 >= 1 and 1 == 1 and 1 < 3 and 3 ~= 5 | ||
| 356 | local _u503c | ||
| 357 | _u503c = function(_u8f93_u5165) | ||
| 358 | _u6253_u5370(_u8f93_u5165) | ||
| 359 | return _u8f93_u5165 | ||
| 360 | end | ||
| 361 | local _u6c42_u503c | ||
| 362 | do | ||
| 363 | local _cond_0 = _u503c(2) | ||
| 364 | _u6c42_u503c = _u503c(1) < _cond_0 and _cond_0 <= _u503c(3) | ||
| 365 | end | ||
| 366 | do | ||
| 367 | local _cond_0 = _u503c(2) | ||
| 368 | _u6c42_u503c = _u503c(1) > _cond_0 and _cond_0 <= _u503c(3) | ||
| 369 | end | ||
| 370 | end | ||
| 354 | return nil | 371 | return nil |
diff --git a/spec/outputs/unicode/in_expression.lua b/spec/outputs/unicode/in_expression.lua index 62aad05..7c584f3 100644 --- a/spec/outputs/unicode/in_expression.lua +++ b/spec/outputs/unicode/in_expression.lua | |||
| @@ -2,43 +2,18 @@ _u51fd_u6570((function() | |||
| 2 | local _val_0 = -_u53d8_u91cfa ^ 2 | 2 | local _val_0 = -_u53d8_u91cfa ^ 2 |
| 3 | return 1 == _val_0 or 2 == _val_0 or 3 == _val_0 | 3 | return 1 == _val_0 or 2 == _val_0 or 3 == _val_0 |
| 4 | end)()) | 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 | 5 | local _u5728_u7684 |
| 15 | do | 6 | do |
| 16 | local _val_0 = "东" | 7 | local _val_0 = "东" |
| 17 | _u5728_u7684 = "东" == _val_0 or "西" == _val_0 | 8 | _u5728_u7684 = "东" == _val_0 or "西" == _val_0 |
| 18 | end | 9 | end |
| 19 | if (1 == _u53d8_u91cfa) and (2 == _u53d8_u91cfb or 3 == _u53d8_u91cfb or 4 == _u53d8_u91cfb) or (function() | 10 | if (1 == _u53d8_u91cfa) and (function() |
| 20 | local _val_0 = _u53d8_u91cfc | 11 | local _val_0 = _u53d8_u91cfb |
| 21 | return 1 <= _val_0 and _val_0 <= 10 | 12 | return 2 == _val_0 or 3 == _val_0 or 4 == _val_0 |
| 22 | end)() then | 13 | end)() then |
| 23 | _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc) | 14 | _u6253_u5370(_u53d8_u91cfa, _u53d8_u91cfb, _u53d8_u91cfc) |
| 24 | end | 15 | end |
| 25 | do | 16 | 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 | 17 | local _u5b58_u5728 |
| 43 | do | 18 | do |
| 44 | local _check_0 = _u8868 | 19 | local _check_0 = _u8868 |
