put both funcs and procs under the same section in the documentation (#16301)

* both funcs and procs are under the same section in the documentation

* update the test
This commit is contained in:
Miran 2020-12-09 10:56:28 +01:00 • committed by GitHub
commit 40255f6721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 31 deletions

View file

@ -1045,12 +1045,9 @@ proc generateDoc*(d: PDoc, n, orig: PNode, docFlags: DocFlags = kDefault) =
let pragmaNode = findPragma(n, wDeprecated)
d.modDeprecationMsg.add(genDeprecationMsg(d, pragmaNode))
of nkCommentStmt: d.modDesc.add(genComment(d, n))
of nkProcDef:
of nkProcDef, nkFuncDef:
when useEffectSystem: documentRaises(d.cache, n)
genItemAux(skProc)
of nkFuncDef:
when useEffectSystem: documentRaises(d.cache, n)
genItemAux(skFunc)
of nkMethodDef:
when useEffectSystem: documentRaises(d.cache, n)
genItemAux(skMethod)
@ -1101,12 +1098,9 @@ proc generateJson*(d: PDoc, n: PNode, includeComments: bool = true) =
d.add %*{"comment": genComment(d, n)}
else:
d.modDesc.add(genComment(d, n))
of nkProcDef:
of nkProcDef, nkFuncDef:
when useEffectSystem: documentRaises(d.cache, n)
d.add genJsonItem(d, n, n[namePos], skProc)
of nkFuncDef:
when useEffectSystem: documentRaises(d.cache, n)
d.add genJsonItem(d, n, n[namePos], skFunc)
of nkMethodDef:
when useEffectSystem: documentRaises(d.cache, n)
d.add genJsonItem(d, n, n[namePos], skMethod)