diff options
author | Li Jin <dragon-fly@qq.com> | 2020-01-18 18:15:24 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-01-18 18:15:24 +0800 |
commit | 8d1af508f4173e4af6a4ea98584c1a86619f6a20 (patch) | |
tree | 0264c4b01f1152d8114cf46aea6fd773276c0b01 /spec/inputs/loops.moon | |
parent | f53ccb373efbf6f6f40284111df309e351c2c18f (diff) | |
download | yuescript-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.moon | 12 |
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 | ||
34 | x = -> | 34 | x = -> |
35 | for x in y | 35 | for x in y |
36 | y | 36 | _ = y |
37 | 37 | ||
38 | hello = {1,2,3,4,5} | 38 | hello = {1,2,3,4,5} |
39 | 39 | ||
@@ -43,7 +43,7 @@ x = for y in *hello | |||
43 | 43 | ||
44 | x = -> | 44 | x = -> |
45 | for x in *hello | 45 | for x in *hello |
46 | y | 46 | _ = y |
47 | 47 | ||
48 | t = for i=10,20 do i * 2 | 48 | t = 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 | ||
69 | while also do | 69 | while also do |
70 | i work too | 70 | i work too |
71 | "okay" | 71 | _ = "okay" |
72 | 72 | ||
73 | i = 0 | 73 | i = 0 |
74 | x = while i < 10 | 74 | x = while i < 10 |