aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/try_catch.yue
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/inputs/unicode/try_catch.yue
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/inputs/unicode/try_catch.yue')
-rw-r--r--spec/inputs/unicode/try_catch.yue60
1 files changed, 60 insertions, 0 deletions
diff --git a/spec/inputs/unicode/try_catch.yue b/spec/inputs/unicode/try_catch.yue
new file mode 100644
index 0000000..71e03ee
--- /dev/null
+++ b/spec/inputs/unicode/try_catch.yue
@@ -0,0 +1,60 @@
1try
2 函数 1, 2, 3
3catch 错误
4 打印 错误
5
6try 函数 1, 2, 3
7catch 错误
8 打印 错误
9
10try
11 打印 "正在try"
12 函数 1, 2, 3
13
14do
15 成功, 结果 = try
16 函数 1, 2, 3
17 catch 错误
18 打印 错误
19
20 成功, 结果 = try 函数 1, 2, 3
21
22try 表.函数
23try 表.函数!
24try 表.函数()
25try (表.函数!)
26try (表\函数(1, 2, 3))
27
28try 表.函数 1
29try 表.函数(1)
30
31if (try 函数 1
32catch 错误
33 打印 错误)
34 打印 "好的"
35
36if try (函数 1)
37catch 错误
38 打印 错误
39 打印 "好的"
40
41do
42 if 成功, 结果 = try 函数 "abc", 123
43 打印 结果
44
45 成功, 结果 = try 函数 "abc", 123
46 catch 错误
47 打印 错误
48
49 打印 结果 if 成功, 结果 = try 函数 "abc", 123
50 catch 错误
51 打印 错误
52
53do
54 try
55 函数 1, 2, 3
56
57 try 函数 1, 2, 3
58
59nil
60