This commit is contained in:
Araq 2014-02-17 08:26:44 +01:00
commit 3ec2973875
2 changed files with 31 additions and 7 deletions

View file

@ -0,0 +1,19 @@
discard """
output: 10
"""
#bug #926
import macros
proc test(f: var PNimrodNode) {.compileTime.} =
f = newNimNode(nnkStmtList)
f.add newCall(newIdentNode("echo"), newLit(10))
macro blah(prc: stmt): stmt =
result = prc
test(result)
proc test() {.blah.} =
echo 5