aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/in_expression.yue
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/unicode/in_expression.yue')
-rw-r--r--spec/inputs/unicode/in_expression.yue52
1 files changed, 52 insertions, 0 deletions
diff --git a/spec/inputs/unicode/in_expression.yue b/spec/inputs/unicode/in_expression.yue
new file mode 100644
index 0000000..efaca47
--- /dev/null
+++ b/spec/inputs/unicode/in_expression.yue
@@ -0,0 +1,52 @@
1-变量a^2 in {1, 2, 3} |> 函数
2
3变量a, 变量b = 函数x(...) not in [1, 3], 2
4
5变量d = (对象.字段x.字段y ...) not in [1, 3]
6
7在的 = "东" in { "东", "西" }
8
9if 变量a in {1} and 变量b in {2, 3, 4} or 变量c in [1, 10]
10 打印 变量a, 变量b, 变量c
11
12switch 值
13 when 1, 2, 3
14 打印 "1, 2, 3"
15
16 when not in (0, 100]
17 打印 "非 (0 < 值 <= 100)"
18
19 when in [200, 300)
20 打印 "200 <= 值 < 300)"
21
22 when not in {333, 444, 555}
23 打印 "非 333, 444 或 555"
24
25do return 变量y not in (开始, 结束)
26
27do
28 存在 = 元素 in 表
29 检查 元素 in 表
30
31do
32 对象 = 获取!
33 存在 = 元素 in 表
34 检查 元素 in 表
35
36do
37 对象 = 获取!
38 列表 = {1, 2, 3}
39 不存在 = 元素 not in 列表
40 检查 元素 in 列表
41 检查 元素 in {1, 2, 3}
42 检查 元素(...) in {[1]: 1, [2]: 2, [3]: 3}
43
44do
45 检查 -> 对象x in 数组tb
46 检查 -> 对象x not in 数组tb
47 local 对象x, 数组tb
48 检查 -> return 对象x in 数组tb
49 检查 -> 对象x not in 数组tb
50
51nil
52