aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/try_catch.yue
diff options
context:
space:
mode:
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