aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/assign.yue
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/unicode/assign.yue')
-rw-r--r--spec/inputs/unicode/assign.yue92
1 files changed, 92 insertions, 0 deletions
diff --git a/spec/inputs/unicode/assign.yue b/spec/inputs/unicode/assign.yue
new file mode 100644
index 0000000..5392a92
--- /dev/null
+++ b/spec/inputs/unicode/assign.yue
@@ -0,0 +1,92 @@
1
2_无效变量 = ->
3 joop变量 = 2302
4
5 (好) ->
6 变量d = 100
7 好 = 1021
8
9 变量a,变量b,变量c,变量d = 1,2,3,4
10
11 你好[232], (5+5)[121], 你好, 变量x[99] = 100, 200, 300, 400
12
13 joop变量 = 12
14
15joop变量 = 2345
16
17变量a, 变量b = if 你好
18 "你好", nil
19else
20 "没啥", "✌️"
21
22
23变量a, 变量b = if 你好
24 if ✌️ then "一", "二" else "mmhh", nil
25else
26 打印 "其它东西"
27 "没啥事", "✌️"
28
29变量c, 变量d = 1, 2 if true
30
31变量x = (do
32 函数!
33 123) if 函数 = 获取处理函数!
34
35(using nil) <- _无效变量
36
37a变量.<> = do
38 打印 123
39 {}
40
41do
42 {元素a, 元素b} = switch 对象c
43 when "a"
44 字典
45 when "b"
46 函数!
47
48a数组[] = if 条件x
49 1
50else
51 2
52
53do
54 变量a, 变量b[] = if x条件
55 switch 对象y
56 when 1
57 函数!
58
59do
60 变量a, {元素b} = if x条件
61 函数!
62 else
63 123, 表
64
65do
66 变量a, 数组b[], 对象c, 对象d.<add> = if 条件x
67 switch 对象y
68 when 1
69 函数!
70 elseif 条件x2
71 if 条件y2
72 函数1!
73 else
74 打印 "hello"
75 do
76 打印 123
77 1, 函数2!
78
79do
80 变量a = 变量b = 变量c = 变量d = 0
81
82do
83 a变量 = b变量 = c变量 = d变量 = 函数!
84
85do
86 {a元素} = :字段b = 对象c.字段d = 变量e = 数组对象
87
88do
89 值 = 123
90 变量a = 变量b = 变量c = 值
91
92nil