AST change: keep nkStaticStmt in the AST for incremental compilation support
This commit is contained in:
parent
1ed7751dac
commit
9ab92824f6
4 changed files with 9 additions and 6 deletions
|
|
@ -863,7 +863,7 @@ 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:
|
||||
of nkCommentStmt, nkTemplateDef, nkImportStmt, nkStaticStmt:
|
||||
return n.PTransNode
|
||||
of nkConstSection:
|
||||
# do not replace ``const c = 3`` with ``const 3 = 3``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue