diff options
author | Araq <rumpf_a@web.de> | 2013-11-27 09:44:53 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-11-27 09:44:53 +0100 |
commit | f10a23e669cb6f17098b3d38c6bb5236ff91f9e9 (patch) | |
tree | ecd8473c402b92b5bd916c5648973a7e7373f7d3 | |
parent | 4855055bca7f5b2900ac15ce0e5cae90c22fa7fa (diff) | |
download | Nim-f10a23e669cb6f17098b3d38c6bb5236ff91f9e9.tar.gz |
removed 'system.eval'
-rw-r--r-- | lib/core/macros.nim | 2 | ||||
-rw-r--r-- | lib/system.nim | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index fc93a157d..d01d4ebee 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -494,7 +494,7 @@ const 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) proc newProc*(name = newEmptyNode(); params: openarray[PNimrodNode] = []; diff --git a/lib/system.nim b/lib/system.nim index 34b67267f..5bd230e4c 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2619,12 +2619,13 @@ type 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 - ## optionally, the block can return an AST tree that will replace the - ## eval expression - macro payload: stmt {.gensym.} = blk - payload() +when false: + template eval*(blk: stmt): stmt = + ## executes a block of code at compile time just as if it was a macro + ## optionally, the block can return an AST tree that will replace the + ## eval expression + macro payload: stmt {.gensym.} = blk + payload() when hostOS != "standalone": proc insert*(x: var string, item: string, i = 0) {.noSideEffect.} = |