final fixes giving us a working compiler

This commit is contained in:
Zahary Karadjov 2013-05-12 02:19:17 +03:00
commit f317807a89
8 changed files with 19 additions and 22 deletions

View file

@ -99,7 +99,7 @@ proc commonType*(x, y: PType): PType =
result.addSonSkipIntLit(r)
proc isTopLevel(c: PContext): bool {.inline.} =
result = c.tab.tos <= 2
result = c.scopeDepth <= 2
proc newSymS(kind: TSymKind, n: PNode, c: PContext): PSym =
result = newSym(kind, considerAcc(n), getCurrOwner(), n.info)
@ -251,7 +251,6 @@ proc myOpen(module: PSym): PPassContext =
c.importTable.addSym(module) # a module knows itself
if sfSystemModule in module.flags:
magicsys.SystemModule = module # set global variable!
InitSystem(c.tab) # currently does nothing
else:
c.importTable.addSym magicsys.SystemModule # import the "System" identifier
importAllSymbols(c, magicsys.SystemModule)