summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-10-19 22:11:04 +0200
committerAraq <rumpf_a@web.de>2012-10-19 22:11:04 +0200
commit3f7a9e9b4739c63784634f7e940a2698981f3331 (patch)
treeb9417002957fe90926c20d1b3d6937a812e1f241
parentac978b32031414e64ec2a148bcc1ff42287e534e (diff)
downloadNim-3f7a9e9b4739c63784634f7e940a2698981f3331.tar.gz
fixes #226
-rwxr-xr-xcompiler/semstmts.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 2789c068b..2cc28437d 100755
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -623,7 +623,7 @@ proc semProcAnnotation(c: PContext, prc: PNode): PNode =
     var key = if it.kind == nkExprColonExpr: it.sons[0] else: it
     let m = lookupMacro(c, key)
     if m == nil: continue
-    # we transform ``proc p {.m, rest.}`` into ``m(proc p {.rest.})`` and
+    # we transform ``proc p {.m, rest.}`` into ``m(do: proc p {.rest.})`` and
     # let the semantic checker deal with it:
     var x = newNodeI(nkCall, n.info)
     x.add(newSymNode(m))
@@ -631,7 +631,7 @@ proc semProcAnnotation(c: PContext, prc: PNode): PNode =
     if it.kind == nkExprColonExpr:
       # pass pragma argument to the macro too:
       x.add(it.sons[1])
-    x.add(prc)
+    x.add(newProcNode(nkDo, prc.info, prc))
     # recursion assures that this works for multiple macro annotations too:
     return semStmt(c, x)