aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/export.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-02-17 11:22:07 +0800
committerLi Jin <dragon-fly@qq.com>2021-02-17 11:22:07 +0800
commit7066392d1c974065181d95d93274136dcd625d43 (patch)
treecf51eafc2c52cbc12246a306bca172d799193d30 /spec/inputs/export.yue
parent90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff)
downloadyuescript-7066392d1c974065181d95d93274136dcd625d43.tar.gz
yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.bz2
yuescript-7066392d1c974065181d95d93274136dcd625d43.zip
stop reusing variables, rename project.
Diffstat (limited to 'spec/inputs/export.yue')
-rw-r--r--spec/inputs/export.yue79
1 files changed, 79 insertions, 0 deletions
diff --git a/spec/inputs/export.yue b/spec/inputs/export.yue
new file mode 100644
index 0000000..085510e
--- /dev/null
+++ b/spec/inputs/export.yue
@@ -0,0 +1,79 @@
1
2export a,b,c = 223, 343, 123
3export cool = "dad"
4
5d,e,f = 3, 2, 1
6export d, e, f
7
8export class Something
9 umm: "cool"
10
11export if this
12 232
13else
14 4343
15
16export What = if this
17 232
18else
19 4343
20
21export y = ->
22 hallo = 3434
23
24export with tmp
25 j = 2000
26
27export cbVal = do
28 h = 100
29 (x)<- f
30 return x h
31
32export y = ->
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 Constant = switch value
42 when "good" then 1
43 when "better" then 2
44 when "best" then 3
45
46export item = 123
47 |> func
48
49export x
50
51f if a then b
52f do 123
53f switch a
54 when b then c
55f [i for i = 1,10]
56f for i = 1,10 do i
57f {k,v for k,v in pairs tb}
58f for k,v in pairs tb do k,v
59f while a do true
60f with a
61 .b = 123
62f a?.b
63f a\b
64f class A
65
66_ = "#{if a then b}"
67_ = "#{do 123}"
68_ = "#{switch a
69 when b then c}"
70_ = "#{[i for i = 1,10]}"
71_ = "#{for i = 1,10 do i}"
72_ = "#{{k,v for k,v in pairs tb}}"
73_ = "#{for k,v in pairs tb do k,v}"
74_ = "#{while a do true}"
75_ = "#{with a
76 .b = 123}"
77_ = "#{a?.b}"
78_ = "#{a\b}"
79_ = "#{class A}"