Skip to content

Commit

Permalink
fix docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Dec 23, 2023
1 parent e35f794 commit 1d5afd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions compiler/docgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,7 @@ proc getAllRunnableExamples(d: PDoc, n: PNode, dest: var ItemPre) =
proc isVisible(d: PDoc; n: PNode): bool =
result = false
if n.kind == nkPostfix:
if n.len == 2 and n[0].kind == nkIdent:
var v = n[0].ident
result = v.id == ord(wStar) or v.id == ord(wMinus)
result = isVisible(d, n[1])
elif n.kind == nkSym:
# we cannot generate code for forwarded symbols here as we have no
# exception tracking information here. Instead we copy over the comment
Expand Down
4 changes: 2 additions & 2 deletions compiler/renderer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ proc isExported(n: PNode): bool =
## This is meant to be used with idents in nkIdentDefs.
case n.kind
of nkPostfix:
n[0].ident.s == "*" and n[1].kind == nkIdent
true
of nkPragmaExpr:
n[0].isExported()
else: false
Expand Down Expand Up @@ -1429,7 +1429,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext, fromStmtList = false) =
let s = n[1].sym
var ret = renderDefinitionName(s)
ret.genSymSuffix(s)
put(g, tkSymbol, ret)
put(g, tkSymbol, ret, if renderSyms in g.flags: s else: nil)
else:
gsub(g, n, 1)
if renderNoPostfix notin g.flags:
Expand Down

0 comments on commit 1d5afd8

Please sign in to comment.