From e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 17 Aug 2023 10:36:15 +0800 Subject: add unicode identifier support, fix more issue from #144 --- spec/outputs/unicode/try_catch.lua | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 spec/outputs/unicode/try_catch.lua (limited to 'spec/outputs/unicode/try_catch.lua') 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 @@ +xpcall(_u51fd_u6570, function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) +end, 1, 2, 3) +xpcall(_u51fd_u6570, function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) +end, 1, 2, 3) +pcall(function() + _u6253_u5370("正在try") + return _u51fd_u6570(1, 2, 3) +end) +do + local _u6210_u529f, _u7ed3_u679c = xpcall(_u51fd_u6570, function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) + end, 1, 2, 3) + _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, 1, 2, 3) +end +pcall(_u8868["函数"]) +pcall(_u8868["函数"]) +pcall(_u8868["函数"]) +pcall((_u8868["函数"])) +pcall(((function() + local _base_0 = _u8868 + local _fn_0 = _base_0["函数"] + return _fn_0 and function(...) + return _fn_0(_base_0, ...) + end +end)()), 1, 2, 3) +pcall(_u8868["函数"], 1) +pcall(_u8868["函数"], 1) +if (xpcall(_u51fd_u6570, function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) +end, 1)) then + _u6253_u5370("好的") +end +if xpcall((_u51fd_u6570), function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) +end, 1) then + _u6253_u5370("好的") +end +do + do + local _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, "abc", 123) + if _u6210_u529f then + _u6253_u5370(_u7ed3_u679c) + end + end + local _u6210_u529f, _u7ed3_u679c = xpcall(_u51fd_u6570, function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) + end, "abc", 123) + _u6210_u529f, _u7ed3_u679c = xpcall(_u51fd_u6570, function(_u9519_u8bef) + return _u6253_u5370(_u9519_u8bef) + end, "abc", 123) + if _u6210_u529f then + _u6253_u5370(_u7ed3_u679c) + end +end +do +pcall(_u51fd_u6570, 1, 2, 3) +pcall(_u51fd_u6570, 1, 2, 3) +end +return nil -- cgit v1.2.3-55-g6feb