nim doc now correctly renders deprecated pragmas for routines and types (#18515)

This commit is contained in:
Timothee Cour 2021-07-19 03:42:45 -07:00 • committed by GitHub
commit 488e9c2991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 17 deletions

View file

@ -593,8 +593,8 @@ proc isHideable(config: ConfigRef, n: PNode): bool =
# xxx compare `ident` directly with `getIdent(cache, wRaises)`, but
# this requires a `cache`.
case n.kind
of nkExprColonExpr: result = n[0].kind == nkIdent and n[0].ident.s in ["raises", "tags", "extern"]
of nkIdent: result = n.ident.s in ["gcsafe"]
of nkExprColonExpr: result = n[0].kind == nkIdent and n[0].ident.s in ["raises", "tags", "extern", "deprecated"]
of nkIdent: result = n.ident.s in ["gcsafe", "deprecated"]
else: result = false
proc gcommaAux(g: var TSrcGen, n: PNode, ind: int, start: int = 0,