Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
parent
95fd8ae93c
commit
f86fc5316a
3 changed files with 46 additions and 24 deletions
|
|
@ -1472,9 +1472,14 @@ proc semProcAnnotation(c: PContext, prc: PNode;
|
|||
if whichPragma(it) != wInvalid:
|
||||
# Not a custom pragma
|
||||
continue
|
||||
elif strTableGet(c.userPragmas, considerQuotedIdent(c, key)) != nil:
|
||||
# User-defined pragma
|
||||
continue
|
||||
else:
|
||||
let ident = considerQuotedIdent(c, key)
|
||||
if strTableGet(c.userPragmas, ident) != nil:
|
||||
continue # User defined pragma
|
||||
else:
|
||||
let sym = searchInScopes(c, ident)
|
||||
if sym != nil and sfCustomPragma in sym.flags:
|
||||
continue # User custom pragma
|
||||
|
||||
# we transform ``proc p {.m, rest.}`` into ``m(do: proc p {.rest.})`` and
|
||||
# let the semantic checker deal with it:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue