Implement custom annotations (#6987)
This commit is contained in:
parent
aff787db69
commit
2c9e56a783
10 changed files with 254 additions and 42 deletions
|
|
@ -608,7 +608,10 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
|
|||
popOwner(c)
|
||||
s.ast = n
|
||||
result = n
|
||||
if n.sons[bodyPos].kind == nkEmpty:
|
||||
if sfCustomPragma in s.flags:
|
||||
if n.sons[bodyPos].kind != nkEmpty:
|
||||
localError(n.sons[bodyPos].info, errImplOfXNotAllowed, s.name.s)
|
||||
elif n.sons[bodyPos].kind == nkEmpty:
|
||||
localError(n.info, errImplOfXexpected, s.name.s)
|
||||
var proto = searchForProc(c, c.currentScope, s)
|
||||
if proto == nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue