> Does your own answer mean you already answered the question yourself? Yes, the second post describes how I solved it.
> instead of this ... you can do this: definition.expectKind(nnkProcDef) Nice to know this exists, but I want the switch / case / match to generate different code depending on the node-kind that is being passed. > And for the AST generation I really recommend you to use quote do Never expected there to be a sort of DSL for this. This is really what I needed. So it implicitly creates a template and parses it using getAST. It feels much more like Lisp now. Thank you for the advice.
