summaryrefslogtreecommitdiff
path: root/spec/inputs/macro.yue
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/macro.yue')
-rw-r--r--spec/inputs/macro.yue15
1 files changed, 2 insertions, 13 deletions
diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue
index 366a3d9..2742bd0 100644
--- a/spec/inputs/macro.yue
+++ b/spec/inputs/macro.yue
@@ -6,6 +6,8 @@ import "macro-export" as {
6 $config:$myconfig, -- rename macro $config to $myconfig 6 $config:$myconfig, -- rename macro $config to $myconfig
7} 7}
8 8
9import "macro-todo" as $
10
9$asserts item == nil 11$asserts item == nil
10 12
11$myconfig false 13$myconfig false
@@ -258,19 +260,6 @@ print $tb[1], $tb.a, ($tb)!, $tb!
258 260
259print "current line: #{ $LINE }" 261print "current line: #{ $LINE }"
260 262
261macro todoInner = (module, line, msg)->
262 print "TODO#{msg and ': ' .. msg or ''} in file #{module}, at line #{line}"
263 {
264 code: "-- TODO#{msg and ': ' .. msg or ''}"
265 type: "lua"
266 }
267
268macro todo = (msg)->
269 if msg
270 "$todoInner $MODULE, $LINE, #{msg}"
271 else
272 "$todoInner $MODULE, $LINE"
273
274$todo 263$todo
275 264
276macro implicitReturnMacroIsAllowed = -> "print 'abc'\n123" 265macro implicitReturnMacroIsAllowed = -> "print 'abc'\n123"