bindSym suffices; no 'bind' for macros anymore

This commit is contained in:
Araq 2012-08-25 01:34:50 +02:00
commit 9a7f0cd851
9 changed files with 48 additions and 73 deletions

View file

@ -186,7 +186,7 @@ proc newIdentNode*(i: string): PNimrodNode {.compileTime.} =
result = newNimNode(nnkIdent)
result.ident = !i
proc bindSym*(ident: string): PNimrodNode {.magic: "NGetBoundSym".}
proc bindSym*(ident: string): PNimrodNode {.magic: "NBindSym".}
## creates a node that binds `ident` to a symbol node. The bound symbol
## needs to be predeclared in a ``bind`` statement!

View file

@ -326,8 +326,7 @@ proc styledEchoProcessArg(color: TForegroundColor) = setForeGroundColor color
proc styledEchoProcessArg(color: TBackgroundColor) = setBackGroundColor color
macro styledEcho*(m: stmt): stmt =
bind styledEchoProcessArg, write, resetAttributes, stdout
## to be documented.
result = newNimNode(nnkStmtList)
for i in countup(1, m.len - 1):