making tests green again

This commit is contained in:
Zahary Karadjov 2012-03-20 14:44:23 +02:00
commit a72fe16f9d
8 changed files with 16 additions and 16 deletions

View file

@ -194,15 +194,15 @@ proc lineinfo*(n: PNimrodNode): string {.magic: "NLineInfo".}
## returns the position the node appears in the original source file
## in the form filename(line, col)
proc parseExpr*(s: string): expr {.magic: "ParseExprToAst".}
proc parseExpr*(s: string): PNimrodNode {.magic: "ParseExprToAst".}
## Compiles the passed string to its AST representation.
## Expects a single expression.
proc parseStmt*(s: string): stmt {.magic: "ParseStmtToAst".}
proc parseStmt*(s: string): PNimrodNode {.magic: "ParseStmtToAst".}
## Compiles the passed string to its AST representation.
## Expects one or more statements.
proc getAst*(macroOrTemplate: expr): expr {.magic: "ExpandToAst".}
proc getAst*(macroOrTemplate: expr): PNimrodNode {.magic: "ExpandToAst".}
## Obtains the AST nodes returned from a macro or template invocation.
## Example:
##

View file

@ -94,7 +94,7 @@ template fail* =
macro check*(conditions: stmt): stmt =
proc standardRewrite(e: PNimrodNode): PNimrodNode =
template rewrite(Exp, lineInfoLit: expr, expLit: string): PNimrodNode =
template rewrite(Exp, lineInfoLit: expr, expLit: string): stmt =
if not Exp:
checkpoint(lineInfoLit & ": Check failed: " & expLit)
fail()
@ -107,7 +107,7 @@ macro check*(conditions: stmt): stmt =
of nnkInfix:
proc rewriteBinaryOp(op: PNimrodNode): PNimrodNode =
template rewrite(op, left, right, lineInfoLit: expr, opLit,
leftLit, rightLit: string, printLhs, printRhs: bool): PNimrodNode =
leftLit, rightLit: string, printLhs, printRhs: bool): stmt =
block:
var
lhs = left

View file

@ -87,7 +87,7 @@ const
IDLE_EVENTS* = 1 shl 5 # WAS 0x10 ???? *
ALL_EVENTS* = not DONT_WAIT
VOLATILE* = 1
STATIC* = 0
TCL_STATIC* = 0
DYNAMIC* = 3 # Channel
TCL_STDIN* = 1 shl 1
TCL_STDOUT* = 1 shl 2