summary refs log tree commit diff stats
path: root/compiler/sem.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-05-12 00:49:00 +0300
committerZahary Karadjov <zahary@gmail.com>2013-05-12 00:49:00 +0300
commit3d1c6de63853dc141b919dc853ade4380a478206 (patch)
treec5c851baa695dbe332db58db347e55248e021dd1 /compiler/sem.nim
parent9a6f47ae69ff3730cc33092c52b3e42187446ccb (diff)
downloadNim-3d1c6de63853dc141b919dc853ade4380a478206.tar.gz
get rid of the SymTab* procs in astalgo
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r--compiler/sem.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim
index 8036dc913..bc6d2c9b6 100644
--- a/compiler/sem.nim
+++ b/compiler/sem.nim
@@ -247,15 +247,15 @@ proc myOpen(module: PSym): PPassContext =
   c.semTypeNode = semTypeNode
   pushProcCon(c, module)
   pushOwner(c.module)
-  openScope(c)                # scope for imported symbols
-  SymTabAdd(c.tab, module)    # a module knows itself
+  c.importTable = openScope(c)
+  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: 
-    SymTabAdd(c.tab, magicsys.SystemModule) # import the "System" identifier
+    c.importTable.addSym magicsys.SystemModule # import the "System" identifier
     importAllSymbols(c, magicsys.SystemModule)
-  closeScope(c)               # scope for the module's symbols  
+  c.topLevelScope = openScope(c)
   result = c
 
 proc myOpenCached(module: PSym, rd: PRodReader): PPassContext =