Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import macros
- static:
- var node = newStmtList()
- macro foo(body: untyped): untyped =
- echo body.treerepr
- node.add body # works
- result = newStmtList()
- result.add body
- proc bar(n:NimNode)= #doesn't work
- var t = foo:
- echo 3
- n.add t
- bar(node)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement