diff options
author | Li Jin <dragon-fly@qq.com> | 2022-07-07 16:22:17 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-07-07 16:22:17 +0800 |
commit | 1eb9ed57de854aa996614b7016bac04a68105389 (patch) | |
tree | 27b46d4a5482ac0ab542d18548c0691aa8115d93 /spec/inputs/macro.yue | |
parent | b26b0c3e7061cd629500994e26fa162ac2668373 (diff) | |
download | yuescript-1eb9ed57de854aa996614b7016bac04a68105389.tar.gz yuescript-1eb9ed57de854aa996614b7016bac04a68105389.tar.bz2 yuescript-1eb9ed57de854aa996614b7016bac04a68105389.zip |
add spec.
Diffstat (limited to 'spec/inputs/macro.yue')
-rw-r--r-- | spec/inputs/macro.yue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue index e391b9e..e4b0fc8 100644 --- a/spec/inputs/macro.yue +++ b/spec/inputs/macro.yue | |||
@@ -24,6 +24,16 @@ if $and f1! | |||
24 | if $and f1!, f2!, f3! | 24 | if $and f1!, f2!, f3! |
25 | print "OK" | 25 | print "OK" |
26 | 26 | ||
27 | item = $copy( | ||
28 | @ | ||
29 | {pos: {}, flags: flags::tonumber!} | ||
30 | id | ||
31 | connections | ||
32 | pos.x | ||
33 | pos.y | ||
34 | pos.z | ||
35 | ) | ||
36 | |||
27 | macro in = (target, ...)-> | 37 | macro in = (target, ...)-> |
28 | values = [value for value in *{...}] | 38 | values = [value for value in *{...}] |
29 | $showMacro "in", table.concat ["#{target} == #{item}" for item in *values], " or " | 39 | $showMacro "in", table.concat ["#{target} == #{item}" for item in *values], " or " |