aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/whitespace.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/whitespace.yue
parent90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff)
downloadyuescript-7066392d1c974065181d95d93274136dcd625d43.tar.gz
yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.bz2
yuescript-7066392d1c974065181d95d93274136dcd625d43.zip
stop reusing variables, rename project.
Diffstat (limited to 'spec/inputs/whitespace.yue')
-rw-r--r--spec/inputs/whitespace.yue140
1 files changed, 140 insertions, 0 deletions
diff --git a/spec/inputs/whitespace.yue b/spec/inputs/whitespace.yue
new file mode 100644
index 0000000..329280f
--- /dev/null
+++ b/spec/inputs/whitespace.yue
@@ -0,0 +1,140 @@
1
2_ = {
3 1, 2
4}
5
6_ = { 1, 2
7}
8
9_ = { 1, 2 }
10
11_ = {1,2}
12
13_ = {
141,2
15
16}
17
18_ = { something 1,2,
19 4,5,6,
20 3,4,5
21}
22
23_ = {
24 a 1,2,3,
25 4,5,6
26 1,2,3
27}
28
29
30_ = {
31 b 1,2,3,
32 4,5,6
33 1,2,3,
34 1,2,3
35}
36
37_ = { 1,2,3 }
38
39_ = { c 1,2,3,
40}
41
42
43hello 1,2,3,4,
44 1,2,3,4,4,5
45
46x 1,
47 2, 3,
48 4, 5, 6
49
50
51hello 1,2,3,
52 world 4,5,6,
53 5,6,7,8
54
55hello 1,2,3,
56 world 4,5,6,
57 5,6,7,8,
58 9,9
59
60
61_ = {
62 hello 1,2,
63 3,4,
64 5, 6
65}
66
67x = {
68 hello 1,2,3,4,
69 5,6,7
70 1,2,3,4
71}
72
73if hello 1,2,3,
74 world,
75 world
76 print "hello"
77
78if hello 1,2,3,
79 world,
80 world
81 print "hello"
82
83
84--
85
86a(
87 one, two, three
88)
89
90b(
91 one,
92 two,
93 three
94)
95
96
97c(one, two,
98 three, four)
99
100--
101
102v = ->
103 a, \-- v1
104 b, \-- v2
105 c -- v3
106
107v1, v2, \
108 v3 = ->
109 a; \-- end of function for v1
110 b, \-- v2
111 c -- v3
112
113a, b, \
114 c, d, \
115e, f = 1, \
116 f2
117 :abc; \-- arg2
118 3, \
119 4, \
120 f5 abc; \-- arg5
121 6
122
123for a, \-- destruct 1
124 b, \-- destruct 2
125 --[[destruct 3]] c \
126 in pairs tb
127 print a, \
128 b, \
129 c
130
131for i = 1, \-- initial
132 10, \-- stop
133 -1 -- step
134 print i
135
136local a,\
137 b,\
138 c
139
140nil