From be1154106a81207dfaf383afc25bfa0e2efb90c7 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 16 Mar 2012 19:33:24 +0100 Subject: clean separation of PNimrodNode and tyExpr --- lib/core/macros.nim | 4 ---- lib/system.nim | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/core/macros.nim b/lib/core/macros.nim index b6b9174cd..1fb012a28 100755 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -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, diff --git a/lib/system.nim b/lib/system.nim index c92c86443..2644d6fbb 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -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 -- cgit 1.4.1-2-gfad0