diff options
author | Li Jin <dragon-fly@qq.com> | 2021-02-17 11:22:07 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-02-17 11:22:07 +0800 |
commit | 7066392d1c974065181d95d93274136dcd625d43 (patch) | |
tree | cf51eafc2c52cbc12246a306bca172d799193d30 /spec/inputs/whitespace.yue | |
parent | 90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff) | |
download | yuescript-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.yue | 140 |
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 | _ = { | ||
14 | 1,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 | |||
43 | hello 1,2,3,4, | ||
44 | 1,2,3,4,4,5 | ||
45 | |||
46 | x 1, | ||
47 | 2, 3, | ||
48 | 4, 5, 6 | ||
49 | |||
50 | |||
51 | hello 1,2,3, | ||
52 | world 4,5,6, | ||
53 | 5,6,7,8 | ||
54 | |||
55 | hello 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 | |||
67 | x = { | ||
68 | hello 1,2,3,4, | ||
69 | 5,6,7 | ||
70 | 1,2,3,4 | ||
71 | } | ||
72 | |||
73 | if hello 1,2,3, | ||
74 | world, | ||
75 | world | ||
76 | print "hello" | ||
77 | |||
78 | if hello 1,2,3, | ||
79 | world, | ||
80 | world | ||
81 | print "hello" | ||
82 | |||
83 | |||
84 | -- | ||
85 | |||
86 | a( | ||
87 | one, two, three | ||
88 | ) | ||
89 | |||
90 | b( | ||
91 | one, | ||
92 | two, | ||
93 | three | ||
94 | ) | ||
95 | |||
96 | |||
97 | c(one, two, | ||
98 | three, four) | ||
99 | |||
100 | -- | ||
101 | |||
102 | v = -> | ||
103 | a, \-- v1 | ||
104 | b, \-- v2 | ||
105 | c -- v3 | ||
106 | |||
107 | v1, v2, \ | ||
108 | v3 = -> | ||
109 | a; \-- end of function for v1 | ||
110 | b, \-- v2 | ||
111 | c -- v3 | ||
112 | |||
113 | a, b, \ | ||
114 | c, d, \ | ||
115 | e, f = 1, \ | ||
116 | f2 | ||
117 | :abc; \-- arg2 | ||
118 | 3, \ | ||
119 | 4, \ | ||
120 | f5 abc; \-- arg5 | ||
121 | 6 | ||
122 | |||
123 | for a, \-- destruct 1 | ||
124 | b, \-- destruct 2 | ||
125 | --[[destruct 3]] c \ | ||
126 | in pairs tb | ||
127 | print a, \ | ||
128 | b, \ | ||
129 | c | ||
130 | |||
131 | for i = 1, \-- initial | ||
132 | 10, \-- stop | ||
133 | -1 -- step | ||
134 | print i | ||
135 | |||
136 | local a,\ | ||
137 | b,\ | ||
138 | c | ||
139 | |||
140 | nil | ||