summary refs log tree commit diff stats
path: root/compiler/lookups.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/lookups.nim')
-rwxr-xr-xcompiler/lookups.nim7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 61b8ead4c..b2ae0d843 100755
--- a/compiler/lookups.nim
+++ b/compiler/lookups.nim
@@ -53,7 +53,7 @@ proc CloseScope*(tab: var TSymTab) =
   var it: TTabIter
   var s = InitTabIter(it, tab.stack[tab.tos-1])
   while s != nil:
-    if sfForward in s.flags: 
+    if sfForward in s.flags:
       LocalError(s.info, errImplOfXexpected, getSymRepr(s))
     elif {sfUsed, sfExported} * s.flags == {} and optHints in s.options: 
       # BUGFIX: check options in s!
@@ -68,7 +68,10 @@ proc AddSym*(t: var TStrTable, n: PSym) =
 proc addDecl*(c: PContext, sym: PSym) = 
   if SymTabAddUnique(c.tab, sym) == Failure: 
     LocalError(sym.info, errAttemptToRedefine, sym.Name.s)
-  
+
+proc addPrelimDecl*(c: PContext, sym: PSym) =
+  discard SymTabAddUnique(c.tab, sym)
+
 proc addDeclAt*(c: PContext, sym: PSym, at: Natural) = 
   if SymTabAddUniqueAt(c.tab, sym, at) == Failure: 
     LocalError(sym.info, errAttemptToRedefine, sym.Name.s)