got rid of 'accept' dir in the tests

This commit is contained in:
Araq 2011-11-19 15:45:51 +01:00
commit a274f3bf5b
264 changed files with 5 additions and 7 deletions

View file

@ -1,32 +0,0 @@
# Dump the contents of a PNimrodNode
import macros
template plus(a, b: expr): expr =
a + b
macro call(e: expr): expr =
return newCall("foo", newStrLitNode("bar"))
macro dumpAST(n: stmt): stmt =
# dump AST as a side-effect and return the inner node
echo n.lispRepr
echo n.treeRepr
var plusAst = getAst(plus(1, 2))
echo plusAst.lispRepr
var callAst = getAst(call())
echo callAst.lispRepr
var e = parseExpr("foo(bar + baz)")
echo e.lispRepr
result = n[1]
dumpAST:
proc add(x, y: int): int =
return x + y
proc sub(x, y: int): int = return x - y