aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2024-10-31 16:29:10 +0800
committerLi Jin <dragon-fly@qq.com>2024-10-31 16:29:19 +0800
commit37c8f0a862a570af707809d530b3284c6ff9229c (patch)
tree78de6d4bdfacd30602823cf05b437dd506572247 /spec/inputs
parent3387abbfe072cbfe1ed1e7a3d71668603831591b (diff)
downloadyuescript-37c8f0a862a570af707809d530b3284c6ff9229c.tar.gz
yuescript-37c8f0a862a570af707809d530b3284c6ff9229c.tar.bz2
yuescript-37c8f0a862a570af707809d530b3284c6ff9229c.zip
Fixed issue #175 and #177.
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/macro.yue15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue
index d5197da..5dafd84 100644
--- a/spec/inputs/macro.yue
+++ b/spec/inputs/macro.yue
@@ -5,6 +5,21 @@ import "macro_export" as {
5 5
6import "macro_todo" as $ 6import "macro_todo" as $
7 7
8macro not_leak = -> "leak"
9do
10 macro x = -> 123
11 print $x
12 do
13 macro x = -> math.pi * 2
14 print $x
15 macro x = -> 456
16 print $x
17
18 import "macro_todo" as $todo: $not_leak
19 $not_leak "todo in a do block"
20
21$not_leak!!
22
8macro WindowFlag = $enum( 23macro WindowFlag = $enum(
9 NoNav 24 NoNav
10 NoDecoration 25 NoDecoration