diff options
Diffstat (limited to 'spec/inputs/unicode/attrib.yue')
-rw-r--r-- | spec/inputs/unicode/attrib.yue | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/spec/inputs/unicode/attrib.yue b/spec/inputs/unicode/attrib.yue new file mode 100644 index 0000000..def1d2a --- /dev/null +++ b/spec/inputs/unicode/attrib.yue | |||
@@ -0,0 +1,53 @@ | |||
1 | const 常量a, 常量b, 常量c, 常量d = 1, 2, 3, 4 | ||
2 | |||
3 | do | ||
4 | close 关闭变量a, 关闭变量b = setmetatable {},__close:=> 打印 "已关闭" | ||
5 | const 变量c, 常量d = 123, 'abc' | ||
6 | |||
7 | close 常量a, 常量b | ||
8 | const 常量c, 常量d | ||
9 | |||
10 | do | ||
11 | const 常量a, {元素b, 元素c}, {元素d} = 函数!, 函数1! | ||
12 | |||
13 | do | ||
14 | const 常量a, {元素b, 元素c}, {元素d} = 函数! | ||
15 | |||
16 | do | ||
17 | close 关闭变量v = if 标记为真 | ||
18 | 函数调用! | ||
19 | else | ||
20 | <close>: => | ||
21 | |||
22 | close 关闭变量f = with io.open "文件.txt" | ||
23 | \write "你好" | ||
24 | |||
25 | do | ||
26 | const 常量a = 1 if true | ||
27 | close 关闭变量b = (if 条件x then 1) unless false | ||
28 | const 常量c = (switch 条件x | ||
29 | when "abc" then 998) if true | ||
30 | close 关闭变量d = | ||
31 | :数值 if 条件a ?? 条件b | ||
32 | |||
33 | do | ||
34 | close _无效变量 = with io.open "文件.txt" | ||
35 | \write "你好" | ||
36 | |||
37 | close _无效变量 = <close>: -> 打印 "第二" | ||
38 | |||
39 | close _无效变量 = <close>: -> 打印 "第一" | ||
40 | |||
41 | _延迟对象数组 = <close>: => | ||
42 | @[#@]! | ||
43 | @[#@] = nil | ||
44 | |||
45 | 延迟 = (项目)-> | ||
46 | _延迟对象数组[] = 项目 | ||
47 | _延迟对象数组 | ||
48 | |||
49 | do | ||
50 | close _无效变量 = 延迟 -> 打印 3 | ||
51 | close _无效变量 = 延迟 -> 打印 2 | ||
52 | close _无效变量 = 延迟 -> 打印 1 | ||
53 | |||