Not sure what will be easiest for you to use/understand..I thought the patty 
approach pretty nice. That said, to answer your last question, the macros 
module has a few interesting things along the lines of what you were asking 
for: `parseExpr`, `parseStmt`, and `emit`. The first two can compile strings to 
ASTs and the last can do that and then put the resulting AST/code in your 
program. `emit` has a little example right in its definition in `macros.nim`. I 
think `emit` is probably what you were asking for.

Reply via email to