diff options
author | Li Jin <dragon-fly@qq.com> | 2023-08-17 10:36:15 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-08-17 10:36:15 +0800 |
commit | e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d (patch) | |
tree | 6e7c5e7e6f13157e9f8db26c38f6d8cba75683e5 /spec/outputs/unicode/attrib.lua | |
parent | 289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (diff) | |
download | yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.gz yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.bz2 yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.zip |
add unicode identifier support, fix more issue from #144
Diffstat (limited to 'spec/outputs/unicode/attrib.lua')
-rw-r--r-- | spec/outputs/unicode/attrib.lua | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/spec/outputs/unicode/attrib.lua b/spec/outputs/unicode/attrib.lua new file mode 100644 index 0000000..0f60451 --- /dev/null +++ b/spec/outputs/unicode/attrib.lua | |||
@@ -0,0 +1,122 @@ | |||
1 | local _u5e38_u91cfa <const>, _u5e38_u91cfb <const>, _u5e38_u91cfc <const>, _u5e38_u91cfd <const> = 1, 2, 3, 4 | ||
2 | do | ||
3 | local _u5173_u95ed_u53d8_u91cfa, _u5173_u95ed_u53d8_u91cfb = setmetatable({ }, { | ||
4 | __close = function(self) | ||
5 | return _u6253_u5370("已关闭") | ||
6 | end | ||
7 | }) | ||
8 | local _close_0 <close> = _u5173_u95ed_u53d8_u91cfa | ||
9 | local _close_1 <close> = _u5173_u95ed_u53d8_u91cfb | ||
10 | local _u53d8_u91cfc <const>, _u5e38_u91cfd <const> = 123, 'abc' | ||
11 | close(_u5e38_u91cfa, _u5e38_u91cfb) | ||
12 | const(_u5e38_u91cfc, _u5e38_u91cfd) | ||
13 | end | ||
14 | do | ||
15 | local _u5e38_u91cfa <const> = _u51fd_u6570() | ||
16 | local _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d | ||
17 | do | ||
18 | local _obj_0, _obj_1 = _u51fd_u65701() | ||
19 | _u5143_u7d20b, _u5143_u7d20c = _obj_0[1], _obj_0[2] | ||
20 | _u5143_u7d20d = _obj_1[1] | ||
21 | end | ||
22 | end | ||
23 | do | ||
24 | local _u5e38_u91cfa, _u5143_u7d20b, _u5143_u7d20c, _u5143_u7d20d | ||
25 | do | ||
26 | local _obj_0, _obj_1, _obj_2 = _u51fd_u6570() | ||
27 | _u5e38_u91cfa = _obj_0 | ||
28 | _u5143_u7d20b, _u5143_u7d20c = _obj_1[1], _obj_1[2] | ||
29 | _u5143_u7d20d = _obj_2[1] | ||
30 | end | ||
31 | end | ||
32 | do | ||
33 | local _u5173_u95ed_u53d8_u91cfv <close> = (function() | ||
34 | if _u6807_u8bb0_u4e3a_u771f then | ||
35 | return _u51fd_u6570_u8c03_u7528() | ||
36 | else | ||
37 | return setmetatable({ }, { | ||
38 | __close = function(self) end | ||
39 | }) | ||
40 | end | ||
41 | end)() | ||
42 | local _u5173_u95ed_u53d8_u91cff <close> = (function() | ||
43 | local _with_0 = io.open("文件.txt") | ||
44 | _with_0:write("你好") | ||
45 | return _with_0 | ||
46 | end)() | ||
47 | end | ||
48 | do | ||
49 | local _u5e38_u91cfa <const> = (function() | ||
50 | if true then | ||
51 | return 1 | ||
52 | end | ||
53 | end)() | ||
54 | local _u5173_u95ed_u53d8_u91cfb <close> = (function() | ||
55 | if not false then | ||
56 | if _u6761_u4ef6x then | ||
57 | return 1 | ||
58 | end | ||
59 | end | ||
60 | end)() | ||
61 | local _u5e38_u91cfc <const> = (function() | ||
62 | if true then | ||
63 | local _exp_0 = _u6761_u4ef6x | ||
64 | if "abc" == _exp_0 then | ||
65 | return 998 | ||
66 | end | ||
67 | end | ||
68 | end)() | ||
69 | local _u5173_u95ed_u53d8_u91cfd <close> = (function() | ||
70 | if (function() | ||
71 | local _exp_0 = _u6761_u4ef6a | ||
72 | if _exp_0 ~= nil then | ||
73 | return _exp_0 | ||
74 | else | ||
75 | return _u6761_u4ef6b | ||
76 | end | ||
77 | end)() then | ||
78 | return { | ||
79 | ["数值"] = _u6570_u503c | ||
80 | } | ||
81 | end | ||
82 | end)() | ||
83 | end | ||
84 | do | ||
85 | local __u65e0_u6548_u53d8_u91cf <close> = (function() | ||
86 | local _with_0 = io.open("文件.txt") | ||
87 | _with_0:write("你好") | ||
88 | return _with_0 | ||
89 | end)() | ||
90 | local __u65e0_u6548_u53d8_u91cf <close> = setmetatable({ }, { | ||
91 | __close = function() | ||
92 | return _u6253_u5370("第二") | ||
93 | end | ||
94 | }) | ||
95 | local __u65e0_u6548_u53d8_u91cf <close> = setmetatable({ }, { | ||
96 | __close = function() | ||
97 | return _u6253_u5370("第一") | ||
98 | end | ||
99 | }) | ||
100 | end | ||
101 | local __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4 = setmetatable({ }, { | ||
102 | __close = function(self) | ||
103 | self[#self]() | ||
104 | self[#self] = nil | ||
105 | end | ||
106 | }) | ||
107 | local _u5ef6_u8fdf | ||
108 | _u5ef6_u8fdf = function(_u9879_u76ee) | ||
109 | __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4[#__u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4 + 1] = _u9879_u76ee | ||
110 | return __u5ef6_u8fdf_u5bf9_u8c61_u6570_u7ec4 | ||
111 | end | ||
112 | do | ||
113 | local __u65e0_u6548_u53d8_u91cf <close> = _u5ef6_u8fdf(function() | ||
114 | return _u6253_u5370(3) | ||
115 | end) | ||
116 | local __u65e0_u6548_u53d8_u91cf <close> = _u5ef6_u8fdf(function() | ||
117 | return _u6253_u5370(2) | ||
118 | end) | ||
119 | local __u65e0_u6548_u53d8_u91cf <close> = _u5ef6_u8fdf(function() | ||
120 | return _u6253_u5370(1) | ||
121 | end) | ||
122 | end | ||