summary refs log tree commit diff stats
path: root/compiler/docgen.nim
diff options
context:
space:
mode:
authorIco Doornekamp <ico@pruts.nl>2019-01-21 22:56:40 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-01-23 11:09:26 +0100
commit7fcf51248bb5c37cf49765bac020fa7bc86dea34 (patch)
tree190ed4a03458fd4709a21019766f260ba6af4731 /compiler/docgen.nim
parent2655f242a838a5845a71bc4857cbc4a7df297eb6 (diff)
downloadNim-7fcf51248bb5c37cf49765bac020fa7bc86dea34.tar.gz
Added --docInternal option to allow 'nim doc' to include non-exported symbols
Diffstat (limited to 'compiler/docgen.nim')
-rw-r--r--compiler/docgen.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 33cd98f38..4271a116e 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -464,7 +464,10 @@ proc isVisible(d: PDoc; n: PNode): bool =
     # we cannot generate code for forwarded symbols here as we have no
     # exception tracking information here. Instead we copy over the comment
     # from the proc header.
-    result = {sfExported, sfFromGeneric, sfForward}*n.sym.flags == {sfExported}
+    if optDocInternal in d.conf.globalOptions:
+      result = {sfFromGeneric, sfForward}*n.sym.flags == {}
+    else:
+      result = {sfExported, sfFromGeneric, sfForward}*n.sym.flags == {sfExported}
     if result and containsOrIncl(d.emitted, n.sym.id):
       result = false
   elif n.kind == nkPragmaExpr: