Question about Macros and AST Documentation

2021-03-16 Thread ynfle
The [macros module documentation](https://nim-lang.org/docs/macros.html) has most of the information that you'd need. [Here](https://nim-lang.org/docs/macros.html#statements-type-section) is the section on a type declaration.

Question about Macros and AST Documentation

2021-03-15 Thread lotzz
Just a simple question. Is there any kind of documentation about what type of children NimNodes expect? dumpAstGen: type test = object Run gives the result nnkStmtList.newTree( nnkTypeSection.newTree( nnkTypeDef.newTree( newI

Question about Macros and AST Documentation

2021-03-15 Thread ElegantBeef
I suggest writting the desired input/output and then work you way from one to the other. I mostly use `dumptree` for this as it tells you what's needed and then you can programatically get there. I recommend [this](https://dev.to/beef331/demystification-of-macros-in-nim-13n8) macro writeup to s