compiler: minor code cleanups
This commit is contained in:
parent
c229df95a4
commit
a0049d1fb0
4 changed files with 4 additions and 5 deletions
|
|
@ -23,7 +23,7 @@
|
||||||
## do a compile-time copy-on-write analysis.
|
## do a compile-time copy-on-write analysis.
|
||||||
|
|
||||||
import
|
import
|
||||||
ast, types, renderer, idents, intsets, options, msgs
|
ast, types, renderer, idents, intsets, options
|
||||||
|
|
||||||
type
|
type
|
||||||
Cursor = object
|
Cursor = object
|
||||||
|
|
|
||||||
|
|
@ -187,10 +187,9 @@ proc impMod(c: PContext; it: PNode; importStmtResult: PNode) =
|
||||||
let it = transformImportAs(c, it)
|
let it = transformImportAs(c, it)
|
||||||
let m = myImportModule(c, it, importStmtResult)
|
let m = myImportModule(c, it, importStmtResult)
|
||||||
if m != nil:
|
if m != nil:
|
||||||
var emptySet: IntSet
|
|
||||||
# ``addDecl`` needs to be done before ``importAllSymbols``!
|
# ``addDecl`` needs to be done before ``importAllSymbols``!
|
||||||
addDecl(c, m, it.info) # add symbol to symbol table of module
|
addDecl(c, m, it.info) # add symbol to symbol table of module
|
||||||
importAllSymbolsExcept(c, m, emptySet)
|
importAllSymbols(c, m)
|
||||||
#importForwarded(c, m.ast, emptySet, m)
|
#importForwarded(c, m.ast, emptySet, m)
|
||||||
|
|
||||||
proc evalImport*(c: PContext, n: PNode): PNode =
|
proc evalImport*(c: PContext, n: PNode): PNode =
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
## https://github.com/nim-lang/RFCs/issues/244 for more details.
|
## https://github.com/nim-lang/RFCs/issues/244 for more details.
|
||||||
|
|
||||||
import
|
import
|
||||||
ast, types, renderer, idents, intsets, options, msgs
|
ast, types, renderer, idents, intsets
|
||||||
|
|
||||||
proc canAlias(arg, ret: PType; marker: var IntSet): bool
|
proc canAlias(arg, ret: PType; marker: var IntSet): bool
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue