aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/loops.moon
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-01-18 18:15:24 +0800
committerLi Jin <dragon-fly@qq.com>2020-01-18 18:15:24 +0800
commit8d1af508f4173e4af6a4ea98584c1a86619f6a20 (patch)
tree0264c4b01f1152d8114cf46aea6fd773276c0b01 /spec/inputs/loops.moon
parentf53ccb373efbf6f6f40284111df309e351c2c18f (diff)
downloadyuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.tar.gz
yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.tar.bz2
yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.zip
fix Moonscript issue 122, add support for ? operator.
Diffstat (limited to 'spec/inputs/loops.moon')
-rw-r--r--spec/inputs/loops.moon12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/inputs/loops.moon b/spec/inputs/loops.moon
index a704e56..130570e 100644
--- a/spec/inputs/loops.moon
+++ b/spec/inputs/loops.moon
@@ -33,7 +33,7 @@ for x in y, z, k
33 33
34x = -> 34x = ->
35 for x in y 35 for x in y
36 y 36 _ = y
37 37
38hello = {1,2,3,4,5} 38hello = {1,2,3,4,5}
39 39
@@ -43,7 +43,7 @@ x = for y in *hello
43 43
44x = -> 44x = ->
45 for x in *hello 45 for x in *hello
46 y 46 _ = y
47 47
48t = for i=10,20 do i * 2 48t = for i=10,20 do i * 2
49 49
@@ -52,11 +52,11 @@ y = for j = 3,30, 8
52 hmm += 1 52 hmm += 1
53 j * hmm 53 j * hmm
54 54
55-> 55_ = ->
56 for k=10,40 56 for k=10,40
57 "okay" 57 _ = "okay"
58 58
59-> 59_ = ->
60 return for k=10,40 60 return for k=10,40
61 "okay" 61 "okay"
62 62
@@ -68,7 +68,7 @@ while 5 + 5
68 68
69while also do 69while also do
70 i work too 70 i work too
71 "okay" 71 _ = "okay"
72 72
73i = 0 73i = 0
74x = while i < 10 74x = while i < 10