Deprecated pragma is now supported on enum fields (#10113)

* {.deprecated.} pragma is now supported for enum fields
* Add tests
* Simplify code
This commit is contained in:
Neelesh Chandola 2018-12-30 14:13:59 +05:30 • committed by Andreas Rumpf
commit c5ad4c10cb
5 changed files with 63 additions and 12 deletions

View file

@ -73,6 +73,7 @@ const
wThread, wRaises, wLocks, wTags, wGcSafe}
forVarPragmas* = {wInject, wGensym}
allRoutinePragmas* = methodPragmas + iteratorPragmas + lambdaPragmas
enumFieldPragmas* = {wDeprecated}
proc getPragmaVal*(procAst: PNode; name: TSpecialWord): PNode =
let p = procAst[pragmasPos]