aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/export.yue
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/unicode/export.yue')
-rw-r--r--spec/inputs/unicode/export.yue90
1 files changed, 90 insertions, 0 deletions
diff --git a/spec/inputs/unicode/export.yue b/spec/inputs/unicode/export.yue
new file mode 100644
index 0000000..151c5f5
--- /dev/null
+++ b/spec/inputs/unicode/export.yue
@@ -0,0 +1,90 @@
1
2export 变量a,变量b,变量c = 223, 343, 123
3export 酷 = "🧧"
4
5变量d,变量e,变量f = 3, 2, 1
6export 变量d, 变量e, 变量f
7
8export class 某类
9 嗯: "酷"
10
11export if 这个
12 232
13else
14 4343
15
16export 什么 = if 这个
17 232
18else
19 4343
20
21export 变量y = ->
22 你好 = 3434
23
24export with 临时
25 变量j = 2000
26
27export cb的值 = do
28 变量h = 100
29 (参数)<- 函数
30 return 参数 h变量
31
32export 丫丫 = ->
33 变量h = 100
34 变量k = 100
35
36export switch 变量h
37 when 100, 150 then 200
38 when 200 then 300
39 else 0
40
41export 常量 = switch 值
42 when "好" then 1
43 when "更好" then 2
44 when "最好" then 3
45
46export 项目 = 123
47 |> 函数
48
49export 变量x
50
51函数 if 条件a then 值b
52函数 do 123
53函数 switch 对象a
54 when 变量b then 值c
55函数 [计数 for 计数 = 1,10]
56函数 for 计数 = 1,10 do 计数
57函数 {键,值 for 键,值 in pairs 表}
58函数 for 键,值 in pairs 表 do {键,值}
59函数 while 条件a do true
60函数 with 条件a
61 .字段b = 123
62函数 对象a?.字段b
63函数 对象a\字段b
64函数 class A类
65
66_ = "#{if 条件a then 值b}"
67_ = "#{do 123}"
68_ = "#{switch 对象a
69 when 变量b then 值c}"
70_ = "#{[计数 for 计数 = 1,10]}"
71_ = "#{for 计数 = 1,10 do 计数}"
72_ = "#{{键,值 for 键,值 in pairs 表}}"
73_ = "#{for 键,值 in pairs 表 do {键,值}}"
74_ = "#{while 条件a do true}"
75_ = "#{with 对象a
76 .字段b = 123}"
77_ = "#{对象a?.字段b}"
78_ = "#{对象a\字段b}"
79_ = "#{class A类}"
80
81local *
82变量1 = 1
83export 变量2 = 2
84export 变量3 = class 类4
85变量5 = 5
86
87export.<"🀄️"> = 1
88export.<name> = "导出"
89export.<call> = => {}
90export["导出-任意-名称"] = 123