aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/unicode/plus.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-08-17 10:36:15 +0800
committerLi Jin <dragon-fly@qq.com>2023-08-17 10:36:15 +0800
commite61cce21ef7def2c2e52dd6cb6a5b540ebcac29d (patch)
tree6e7c5e7e6f13157e9f8db26c38f6d8cba75683e5 /spec/outputs/unicode/plus.lua
parent289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (diff)
downloadyuescript-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/plus.lua')
-rw-r--r--spec/outputs/unicode/plus.lua73
1 files changed, 73 insertions, 0 deletions
diff --git a/spec/outputs/unicode/plus.lua b/spec/outputs/unicode/plus.lua
new file mode 100644
index 0000000..75e4aac
--- /dev/null
+++ b/spec/outputs/unicode/plus.lua
@@ -0,0 +1,73 @@
1local _call_0 = _u53d8_u91cfx
2_call_0["执行"](_call_0, "工作")
3_u65b9_u6cd5((function()
4 local _call_1 = _u53d8_u91cfa
5 local _call_2 = _call_1["执行"](_call_1)
6 local _call_3 = _call_2["结束"](_call_2, "好")
7 return _call_3["如果"](_call_3, "abc", 123)
8end)())
9local _call_1 = _u53d8_u91cfb["函数"]
10local _call_2 = _call_1["执行"](_call_1)
11local _call_3 = _call_2["当"](_call_2, "好")
12local _u7ed3_u679c = _call_3["如果"](_call_3, "def", 998)
13local _call_4 = _u53d8_u91cfc["重复"]["如果"]
14local _call_5 = _call_4["然后"](_call_4, "xyz")
15_call_5["否则"](_call_5, _u7ed3_u679c)
16_u6253_u5370(self["循环"], self.__class["函数"](self.__class, 123))
17do
18 local _call_6 = _u6d88_u606f
19 local _u989c_u8272 = _call_6["匹配"](_call_6, "<%w*>")
20 if _u989c_u8272 then
21 local _call_7 = _u6d88_u606f
22 local _u6d88_u606f = _call_7["替换"](_call_7, "<%->", _u989c_u8272)
23 end
24end
25local _u6d88_u606f
26do
27 local _u989c_u8272 = _u6d88_u606f["匹配"](_u6d88_u606f, "<%w*>")
28 if _u989c_u8272 then
29 _u6d88_u606f = _u6d88_u606f["替换"](_u6d88_u606f, "<%->", _u989c_u8272)
30 end
31end
32local _u6570_u503cA
33do
34 local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5()
35 if _u65b9_u6cd5 then
36 _u6570_u503cA = _u65b9_u6cd5()
37 end
38end
39local _u6570_u503cA
40do
41 local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5()
42 if _u65b9_u6cd5 then
43 _u6570_u503cA = _u65b9_u6cd5()
44 end
45end
46local _u6570_u503cB
47do
48 local _u65b9_u6cd5 = _u83b7_u53d6_u65b9_u6cd5()
49 if _u65b9_u6cd5 ~= nil then
50 _u6570_u503cB = _u65b9_u6cd5()
51 end
52end
53_u80cc_u5305 = {
54 ["东西"] = {
55 ["好的"] = 200,
56 ["他们"] = function()
57 _u6253_u5370("你好")
58 return _u4f60_u7684_u811a("小")
59 end,
60 ["美丽"] = _u5934_u53d1,
61 ["黄金"] = _u55ef_u54fc
62 },
63 ["为什么"] = 1000,
64 ["吃"] = _u98df_u7269,
65 ["好的"] = _u670b_u53cb
66}
67local _u5f00_u59cb = {
68 ["东西"] = "冷"
69}
70local _u6d17_u6fa1
71_u6d17_u6fa1 = {
72 ["在"] = "火"
73}