the .deprecated pragma for procs now supports a user-definable deprecation message
This commit is contained in:
parent
1b22a3b346
commit
212457f5e0
5 changed files with 27 additions and 4 deletions
|
|
@ -810,7 +810,10 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int,
|
|||
of wExplain:
|
||||
sym.flags.incl sfExplain
|
||||
of wDeprecated:
|
||||
if it.kind in nkPragmaCallKinds: deprecatedStmt(c, it)
|
||||
if sym != nil and sym.kind in routineKinds:
|
||||
if it.kind in nkPragmaCallKinds: discard getStrLitNode(c, it)
|
||||
incl(sym.flags, sfDeprecated)
|
||||
elif it.kind in nkPragmaCallKinds: deprecatedStmt(c, it)
|
||||
elif sym != nil: incl(sym.flags, sfDeprecated)
|
||||
else: incl(c.module.flags, sfDeprecated)
|
||||
of wVarargs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue