clean separation of PNimrodNode and tyExpr
This commit is contained in:
parent
4da067691e
commit
be1154106a
7 changed files with 32 additions and 22 deletions
|
|
@ -87,10 +87,6 @@ type
|
|||
## represents a Nimrod *symbol* in the compiler; a *symbol* is a looked-up
|
||||
## *ident*.
|
||||
|
||||
TNimrodNode {.final.} = object
|
||||
PNimrodNode* {.magic: "PNimrodNode".} = ref TNimrodNode
|
||||
## represents a Nimrod AST node. Macros operate on this type.
|
||||
|
||||
const
|
||||
nnkLiterals* = {nnkCharLit..nnkNilLit}
|
||||
nnkCallKinds* = {nnkCall, nnkInfix, nnkPrefix, nnkPostfix, nnkCommand,
|
||||
|
|
|
|||
|
|
@ -2220,6 +2220,11 @@ proc shallow*(s: var string) {.noSideEffect, inline.} =
|
|||
# const res = e
|
||||
# res
|
||||
|
||||
type
|
||||
TNimrodNode {.final.} = object
|
||||
PNimrodNode* {.magic: "PNimrodNode".} = ref TNimrodNode
|
||||
## represents a Nimrod AST node. Macros operate on this type.
|
||||
|
||||
template eval*(blk: stmt): stmt =
|
||||
## executes a block of code at compile time just as if it was a macro
|
||||
## optonally, the block can return an AST tree that will replace the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue