Hi,
All the parameters of a macro are received as NimNode. This is great if I want to modify the source tree, but for the rest of the parameters I have to use intVal, boolVar, floatVar and $ all the time, not to mention working with complicated structures. Is it possible to receive some of the parameters as pure, i.e. not as NimNode? Or is there a generic converter function (I haven't found it) which converts a NimNode to expr?
Thanks, Peter
Actually typedesc and static[T] parameters are not converted to NimNode (which is one reason static[T] is so buggy...) so eventually you can use
macro m(b: static[bool]): expr =
if b:
...