aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-02-20 13:39:26 +0800
committerLi Jin <dragon-fly@qq.com>2020-02-20 13:39:26 +0800
commit3a084cfad7aa8da8d2c4b7849347b0832ef8e87e (patch)
tree58704a96284a9011ce45b86ba59a8a227c2efc27 /spec
parent0eaea3f979ef46fe195649ee18400f014957db26 (diff)
downloadyuescript-3a084cfad7aa8da8d2c4b7849347b0832ef8e87e.tar.gz
yuescript-3a084cfad7aa8da8d2c4b7849347b0832ef8e87e.tar.bz2
yuescript-3a084cfad7aa8da8d2c4b7849347b0832ef8e87e.zip
allow value list in assignment to be multiline fixing Moonscript issue 390.
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/class.moon16
-rw-r--r--spec/inputs/whitespace.moon14
2 files changed, 29 insertions, 1 deletions
diff --git a/spec/inputs/class.moon b/spec/inputs/class.moon
index 83f3760..3288dc6 100644
--- a/spec/inputs/class.moon
+++ b/spec/inputs/class.moon
@@ -210,4 +210,20 @@ class Wowha extends Thing
210 super\hello 210 super\hello
211 } 211 }
212 212
213do
214 class Test
215 new: => @@if = true
216 @do: => 1
217 test: => @@if and @@do!
218 test = Test!
219 test\test!
220
221do
222 class Test
223 new: => @if = true
224 do: => 1
225 test: => @if and @do!
226 test = Test!
227 test\test!
228
213nil 229nil
diff --git a/spec/inputs/whitespace.moon b/spec/inputs/whitespace.moon
index 36f14ae..0422443 100644
--- a/spec/inputs/whitespace.moon
+++ b/spec/inputs/whitespace.moon
@@ -97,6 +97,18 @@ b(
97c(one, two, 97c(one, two,
98 three, four) 98 three, four)
99 99
100-- 100--
101
102f = ->
103 a,
104 b,
105 c
106
107a,
108 b,
109 c = 1,
110 2,
111 f
112 :abc
101 113
102nil 114nil