Implement custom annotations (#6987)

This commit is contained in:
cooldome 2018-01-09 14:25:22 +00:00 • committed by Andreas Rumpf
commit 2c9e56a783
10 changed files with 254 additions and 42 deletions

View file

@ -1153,6 +1153,9 @@ proc semProcAnnotation(c: PContext, prc: PNode;
else:
localError(prc.info, errOnlyACallOpCanBeDelegator)
continue
elif sfCustomPragma in m.flags:
continue # semantic check for custom pragma happens later in semProcAux
# 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)