aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/nil_coalescing.yue
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/unicode/nil_coalescing.yue')
-rw-r--r--spec/inputs/unicode/nil_coalescing.yue48
1 files changed, 48 insertions, 0 deletions
diff --git a/spec/inputs/unicode/nil_coalescing.yue b/spec/inputs/unicode/nil_coalescing.yue
new file mode 100644
index 0000000..104142e
--- /dev/null
+++ b/spec/inputs/unicode/nil_coalescing.yue
@@ -0,0 +1,48 @@
1do
2 变量a = 变量b ?? 变量c
3
4do
5 :字段a = 变量b ?? 变量c
6
7do
8 变量a = 函数!
9 变量a ??= false
10
11do
12 变量a ??= 函数!
13
14do
15 local 变量a, 变量b, 变量c, 变量d, 变量e
16 变量a = 变量b ?? 变量c ?? 变量d ?? 变量e
17
18do
19 变量a = 变量b ?? 变量c ?? 变量d ?? 变量e
20
21do
22 函数 变量x ?? "你好"
23
24do
25 with 函数A! ?? 函数B!
26 打印 .字段
27
28do
29 变量a = 1 + 2 + 变量b ?? 变量c + 3 + 4
30
31do
32 变量a = 1 + 2 + (变量b ?? 变量c) + 3 + 4
33
34do
35 :字段a, :字段b = 函数!
36 变量a or= 1
37 变量b ??= 变量c ?? 2
38
39do
40 变量a = 1 ?? 2 ?? 3
41
42do
43 变量a.字段.字段 ??= 1
44 变量a = 变量b.字段 ?? 变量c.字段 ?? 变量d.字段
45 变量a.字段 ??= 1
46
47nil
48