removed 'system.eval'
This commit is contained in:
parent
4855055bca
commit
f10a23e669
2 changed files with 8 additions and 7 deletions
|
|
@ -494,7 +494,7 @@ const
|
||||||
|
|
||||||
from strutils import cmpIgnoreStyle, format
|
from strutils import cmpIgnoreStyle, format
|
||||||
|
|
||||||
proc ExpectKind*(n: PNimrodNode; k: set[TNimrodNodeKind]) {.compileTime.} =
|
proc expectKind*(n: PNimrodNode; k: set[TNimrodNodeKind]) {.compileTime.} =
|
||||||
assert n.kind in k, "Expected one of $1, got $2".format(k, n.kind)
|
assert n.kind in k, "Expected one of $1, got $2".format(k, n.kind)
|
||||||
|
|
||||||
proc newProc*(name = newEmptyNode(); params: openarray[PNimrodNode] = [];
|
proc newProc*(name = newEmptyNode(); params: openarray[PNimrodNode] = [];
|
||||||
|
|
|
||||||
|
|
@ -2619,12 +2619,13 @@ type
|
||||||
PNimrodNode* {.magic: "PNimrodNode".} = ref TNimrodNode
|
PNimrodNode* {.magic: "PNimrodNode".} = ref TNimrodNode
|
||||||
## represents a Nimrod AST node. Macros operate on this type.
|
## represents a Nimrod AST node. Macros operate on this type.
|
||||||
|
|
||||||
template eval*(blk: stmt): stmt =
|
when false:
|
||||||
## executes a block of code at compile time just as if it was a macro
|
template eval*(blk: stmt): stmt =
|
||||||
## optionally, the block can return an AST tree that will replace the
|
## executes a block of code at compile time just as if it was a macro
|
||||||
## eval expression
|
## optionally, the block can return an AST tree that will replace the
|
||||||
macro payload: stmt {.gensym.} = blk
|
## eval expression
|
||||||
payload()
|
macro payload: stmt {.gensym.} = blk
|
||||||
|
payload()
|
||||||
|
|
||||||
when hostOS != "standalone":
|
when hostOS != "standalone":
|
||||||
proc insert*(x: var string, item: string, i = 0) {.noSideEffect.} =
|
proc insert*(x: var string, item: string, i = 0) {.noSideEffect.} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue