fixes #226
This commit is contained in:
parent
ac978b3203
commit
3f7a9e9b47
1 changed files with 2 additions and 2 deletions
|
|
@ -623,7 +623,7 @@ proc semProcAnnotation(c: PContext, prc: PNode): PNode =
|
||||||
var key = if it.kind == nkExprColonExpr: it.sons[0] else: it
|
var key = if it.kind == nkExprColonExpr: it.sons[0] else: it
|
||||||
let m = lookupMacro(c, key)
|
let m = lookupMacro(c, key)
|
||||||
if m == nil: continue
|
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:
|
# let the semantic checker deal with it:
|
||||||
var x = newNodeI(nkCall, n.info)
|
var x = newNodeI(nkCall, n.info)
|
||||||
x.add(newSymNode(m))
|
x.add(newSymNode(m))
|
||||||
|
|
@ -631,7 +631,7 @@ proc semProcAnnotation(c: PContext, prc: PNode): PNode =
|
||||||
if it.kind == nkExprColonExpr:
|
if it.kind == nkExprColonExpr:
|
||||||
# pass pragma argument to the macro too:
|
# pass pragma argument to the macro too:
|
||||||
x.add(it.sons[1])
|
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:
|
# recursion assures that this works for multiple macro annotations too:
|
||||||
return semStmt(c, x)
|
return semStmt(c, x)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue