diff options
author | Li Jin <dragon-fly@qq.com> | 2020-03-11 00:31:43 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-03-11 00:31:43 +0800 |
commit | e2490546fe9937d43b87c0432b967824dd0f90c7 (patch) | |
tree | e47110b7dbb812e57a5328288c26689e395ae676 | |
parent | 1ee056eedf773ac6166247755439092e0e0a9bca (diff) | |
download | yuescript-e2490546fe9937d43b87c0432b967824dd0f90c7.tar.gz yuescript-e2490546fe9937d43b87c0432b967824dd0f90c7.tar.bz2 yuescript-e2490546fe9937d43b87c0432b967824dd0f90c7.zip |
update.
-rw-r--r-- | spec/inputs/macro.moon | 3 | ||||
-rw-r--r-- | spec/inputs/macro_export.moon | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/inputs/macro.moon b/spec/inputs/macro.moon index eb1e224..db03a10 100644 --- a/spec/inputs/macro.moon +++ b/spec/inputs/macro.moon | |||
@@ -61,9 +61,10 @@ macro expr pipe = (...)-> | |||
61 | 61 | ||
62 | $foreach $filter($map({1,2,3}, _ * 2), _ > 4), print _ | 62 | $foreach $filter($map({1,2,3}, _ * 2), _ > 4), print _ |
63 | 63 | ||
64 | print $pipe( | 64 | val = $pipe( |
65 | {1, 2, 3} | 65 | {1, 2, 3} |
66 | $map(_ * 2) | 66 | $map(_ * 2) |
67 | $filter(_ > 4) | 67 | $filter(_ > 4) |
68 | $reduce(0, _1 + _2) | 68 | $reduce(0, _1 + _2) |
69 | ) | 69 | ) |
70 | |||
diff --git a/spec/inputs/macro_export.moon b/spec/inputs/macro_export.moon index 369b83b..759c6d1 100644 --- a/spec/inputs/macro_export.moon +++ b/spec/inputs/macro_export.moon | |||
@@ -7,7 +7,7 @@ export macro expr showMacro = (name,res)-> | |||
7 | if debugMacro | 7 | if debugMacro |
8 | "do | 8 | "do |
9 | txt = #{res} | 9 | txt = #{res} |
10 | print '['..#{name}..']' | 10 | print '[macro '..#{name}..']' |
11 | print txt | 11 | print txt |
12 | txt" | 12 | txt" |
13 | else | 13 | else |