This is how I would do it.
import macros
var saveNode {.compiletime.} : NimNode
macro tester2(a : varargs[typed]) : untyped =
echo treeRepr saveNode
echo treeRepr a
macro tester(a : untyped) : untyped =
saveNode = a
result = newCall(bindSym"tester2",a[1],a[2])
var a = 5
var b = 8
tester(a|b)
Run
- Can I Pass Multiple Identifiers to a Single Typed Macro Body? 3nki
- Re: Can I Pass Multiple Identifiers to a Single Typed Macro B... 3nki
- Re: Can I Pass Multiple Identifiers to a Single Typed Mac... solo989
