diff options
author | Li Jin <dragon-fly@qq.com> | 2025-01-31 01:02:59 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2025-01-31 01:02:59 +0800 |
commit | f5c1735262f07f8064575bebec8b593559abe619 (patch) | |
tree | c0e3d660e647843c37df451e4028ec5590edb8e2 /spec/inputs | |
parent | cf91f61990babdd8a80774809e9e860a155e4201 (diff) | |
download | yuescript-f5c1735262f07f8064575bebec8b593559abe619.tar.gz yuescript-f5c1735262f07f8064575bebec8b593559abe619.tar.bz2 yuescript-f5c1735262f07f8064575bebec8b593559abe619.zip |
Fixing issue #178.
Diffstat (limited to 'spec/inputs')
-rw-r--r-- | spec/inputs/macro.yue | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/inputs/macro.yue b/spec/inputs/macro.yue index 5dafd84..5d5f1a9 100644 --- a/spec/inputs/macro.yue +++ b/spec/inputs/macro.yue | |||
@@ -340,6 +340,15 @@ _1 = -> | |||
340 | print 2 | 340 | print 2 |
341 | print 3 | 341 | print 3 |
342 | 342 | ||
343 | do | ||
344 | macro foo = -> code: "tb:func(123)", type: "lua" | ||
345 | f = -> | ||
346 | x = $foo\bar 456 | ||
347 | $foo! | ||
348 | f1 = -> | ||
349 | $foo! | ||
350 | return | ||
351 | |||
343 | macro implicitReturnMacroIsAllowed = -> "print 'abc'\n123" | 352 | macro implicitReturnMacroIsAllowed = -> "print 'abc'\n123" |
344 | 353 | ||
345 | $implicitReturnMacroIsAllowed | 354 | $implicitReturnMacroIsAllowed |