fixes #20524; add forbids pragmas to hideable lists (#20525)

* fixes #20524; add forbids pragmas to hideable lists

* fixes nimdoc
This commit is contained in:
ringabout 2022-10-10 00:13:45 +08:00 • committed by GitHub
commit 0c0b086d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 54 deletions

View file

@ -598,7 +598,7 @@ 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", "deprecated"]
of nkExprColonExpr: result = n[0].kind == nkIdent and n[0].ident.s in ["raises", "tags", "extern", "deprecated", "forbids"]
of nkIdent: result = n.ident.s in ["gcsafe", "deprecated"]
else: result = false