From 4255eb511ec688960bf03fd53b8df87186b7d988 Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Tue, 4 Jun 2013 22:28:20 -0600 Subject: [PATCH 1/2] made macros.dumptree and dumplisp immediate, deprecated the *_imm versions --- lib/core/macros.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index bbf970102e..720b151895 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -390,7 +390,7 @@ proc lispRepr*(n: PNimrodNode): string {.compileTime.} = add(result, ")") -macro dumpTree*(s: stmt): stmt = echo s.treeRepr +macro dumpTree*(s: stmt): stmt {.immediate.} = echo s.treeRepr ## Accepts a block of nimrod code and prints the parsed abstract syntax ## tree using the `toTree` function. Printing is done *at compile time*. ## @@ -398,16 +398,16 @@ macro dumpTree*(s: stmt): stmt = echo s.treeRepr ## tree and to discover what kind of nodes must be created to represent ## a certain expression/statement. -macro dumpLisp*(s: stmt): stmt = echo s.lispRepr +macro dumpLisp*(s: stmt): stmt {.immediate.} = echo s.lispRepr ## Accepts a block of nimrod code and prints the parsed abstract syntax ## tree using the `toLisp` function. Printing is done *at compile time*. ## ## See `dumpTree`. -macro dumpTreeImm*(s: stmt): stmt {.immediate.} = echo s.treeRepr +macro dumpTreeImm*(s: stmt): stmt {.immediate, deprecated.} = echo s.treeRepr ## The ``immediate`` version of `dumpTree`. -macro dumpLispImm*(s: stmt): stmt {.immediate.} = echo s.lispRepr +macro dumpLispImm*(s: stmt): stmt {.immediate, deprecated.} = echo s.lispRepr ## The ``immediate`` version of `dumpLisp`. From 7ea77d93e370040b4971c9f209e4b465c49721a5 Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Tue, 4 Jun 2013 22:33:55 -0600 Subject: [PATCH 2/2] Update news.txt --- web/news.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/news.txt b/web/news.txt index 4f932bc05d..d844b50122 100644 --- a/web/news.txt +++ b/web/news.txt @@ -36,7 +36,7 @@ Language Additions - Arrays can now be declared with a single integer literal ``N`` instead of a range; the range is then ``0..N-1``. - +- macros.dumptree and macros.dumplisp have been made immediate, dumptree_imm and dumplisp_imm are now deprecated. 2013-05-20 New website design!