fixes #1616; fixes 'nim doc' regressions

This commit is contained in:
Andreas Rumpf 2018-09-17 17:35:00 +02:00
commit 3467c455c0
3 changed files with 49 additions and 19 deletions

View file

@ -914,7 +914,8 @@ proc transform(c: PTransf, n: PNode): PTransNode =
# ensure that e.g. discard "some comment" gets optimized away
# completely:
result = PTransNode(newNode(nkCommentStmt))
of nkCommentStmt, nkTemplateDef, nkImportStmt, nkStaticStmt:
of nkCommentStmt, nkTemplateDef, nkImportStmt, nkStaticStmt,
nkExportStmt, nkExportExceptStmt:
return n.PTransNode
of nkConstSection:
# do not replace ``const c = 3`` with ``const 3 = 3``