aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/assign.moon3
-rw-r--r--spec/inputs/destructure.moon9
-rw-r--r--spec/inputs/syntax.moon9
3 files changed, 17 insertions, 4 deletions
diff --git a/spec/inputs/assign.moon b/spec/inputs/assign.moon
index 4e50147..e8fcbfd 100644
--- a/spec/inputs/assign.moon
+++ b/spec/inputs/assign.moon
@@ -26,5 +26,4 @@ else
26 print "the other" 26 print "the other"
27 "nothing", "yeah" 27 "nothing", "yeah"
28 28
29 29c, d = 1, 2 if true
30
diff --git a/spec/inputs/destructure.moon b/spec/inputs/destructure.moon
index e0f2198..d61b6ae 100644
--- a/spec/inputs/destructure.moon
+++ b/spec/inputs/destructure.moon
@@ -103,3 +103,12 @@ do
103 103
104do 104do
105 {if:{a,b,c}} = thing 105 {if:{a,b,c}} = thing
106
107do
108 {:a, :b} = {a: "Hello", b: "World"} if true
109
110 {days, hours, mins, secs} = [tonumber a for a in *{
111 string.match "1 2 3 4", "(.+)%s(.+)%s(.+)%s(.+)"
112 }]
113
114 {:one, :two, :three} = {w,true for w in foo\gmatch("%S+")}
diff --git a/spec/inputs/syntax.moon b/spec/inputs/syntax.moon
index abee3e3..ae3fc0c 100644
--- a/spec/inputs/syntax.moon
+++ b/spec/inputs/syntax.moon
@@ -281,10 +281,15 @@ It's OK.
281func --[[port]] 3000, --[[ip]] "192.168.1.1" 281func --[[port]] 3000, --[[ip]] "192.168.1.1"
282 282
283f = -> 283f = ->
284 a,b, \ 284 a,b,
285 c,d, \ 285 c,d,
286 e,f 286 e,f
287 287
288f = ->
289 a,b \
290 ,c,d \
291 ,e,f
292
288with obj 293with obj
289 invoke \ 294 invoke \
290 --[[arg1]] \func!, 295 --[[arg1]] \func!,