aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-02-20 14:43:34 +0800
committerLi Jin <dragon-fly@qq.com>2020-02-20 14:43:34 +0800
commita4bbfc61a8973ad029bd7d7908bf2c24398c0715 (patch)
treeb6100b8e2ac1d4f13bc2557f90c67d4cbd6061b4 /spec
parent3a084cfad7aa8da8d2c4b7849347b0832ef8e87e (diff)
downloadyuescript-a4bbfc61a8973ad029bd7d7908bf2c24398c0715.tar.gz
yuescript-a4bbfc61a8973ad029bd7d7908bf2c24398c0715.tar.bz2
yuescript-a4bbfc61a8973ad029bd7d7908bf2c24398c0715.zip
allow value lists in for statement and in local statement to be multiline got Moonscript issue 390 fixed.
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/whitespace.moon39
1 files changed, 32 insertions, 7 deletions
diff --git a/spec/inputs/whitespace.moon b/spec/inputs/whitespace.moon
index 0422443..06b8773 100644
--- a/spec/inputs/whitespace.moon
+++ b/spec/inputs/whitespace.moon
@@ -99,16 +99,41 @@ c(one, two,
99 99
100-- 100--
101 101
102f = -> 102v = ->
103 a, 103 a,
104 b, 104 b,
105 c 105 c
106 106
107a, 107v1, v2,
108 b, 108 v3 = ->
109 c = 1, 109 a;
110 2, 110 b,
111 f 111 c
112 :abc 112
113a, b,
114 c, d,
115e, f = 1,
116 f2
117 :abc;
118 3,
119 4,
120 f5 abc;
121 6
122
123for a,
124 b,
125 c in pairs tb
126 print a,
127 b,
128 c
129
130for i = 1,
131 10,
132 -1
133 print i
134
135local a,
136 b,
137 c
113 138
114nil 139nil