aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/lists.moon
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-01-25 17:48:03 +0800
committerLi Jin <dragon-fly@qq.com>2020-01-25 17:48:03 +0800
commited317e62eb1cf98fde4461fc90c6cb1045ebc7e8 (patch)
tree427e365939da39f31dbfa755675fb60bb141583d /spec/inputs/lists.moon
parent4827d200604a086e2ad94edb4257c3abc7a3c4fc (diff)
downloadyuescript-ed317e62eb1cf98fde4461fc90c6cb1045ebc7e8.tar.gz
yuescript-ed317e62eb1cf98fde4461fc90c6cb1045ebc7e8.tar.bz2
yuescript-ed317e62eb1cf98fde4461fc90c6cb1045ebc7e8.zip
fix Moonscript issue 375.
Diffstat (limited to 'spec/inputs/lists.moon')
-rw-r--r--spec/inputs/lists.moon14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/inputs/lists.moon b/spec/inputs/lists.moon
index ef5650c..15eb9ab 100644
--- a/spec/inputs/lists.moon
+++ b/spec/inputs/lists.moon
@@ -6,7 +6,7 @@ items = {1,2,3,4,5,6}
6_ = [z for z in ipairs items when z > 4] 6_ = [z for z in ipairs items when z > 4]
7 7
8rad = [{a} for a in ipairs { 8rad = [{a} for a in ipairs {
9 1,2,3,4,5,6, 9 1,2,3,4,5,6,
10} when good_number a] 10} when good_number a]
11 11
12 12
@@ -17,11 +17,11 @@ require "util"
17dump = (x) -> print util.dump x 17dump = (x) -> print util.dump x
18 18
19range = (count) -> 19range = (count) ->
20 i = 0 20 i = 0
21 return coroutine.wrap -> 21 return coroutine.wrap ->
22 while i < count 22 while i < count
23 coroutine.yield i 23 coroutine.yield i
24 i = i + 1 24 i = i + 1
25 25
26dump [x for x in range 10] 26dump [x for x in range 10]
27dump [{x, y} for x in range 5 when x > 2 for y in range 5] 27dump [{x, y} for x in range 5 when x > 2 for y in range 5]
@@ -61,7 +61,7 @@ print y for y in *x[a,b,c]
61 61
62 62
63normal = (hello) -> 63normal = (hello) ->
64 [x for x in yeah] 64 [x for x in yeah]
65 65
66 66
67test = x 1,2,3,4,5 67test = x 1,2,3,4,5