This commit is contained in:
Araq 2015-01-18 14:42:03 +01:00
commit 5f6131cbdc
4 changed files with 36 additions and 13 deletions

View file

@ -82,6 +82,16 @@ proc searchInScopes*(c: PContext, s: PIdent): PSym =
if result != nil: return
result = nil
proc debugScopes*(c: PContext) {.deprecated.} =
var i = 0
for scope in walkScopes(c.currentScope):
echo "scope ", i
for h in 0 .. high(scope.symbols.data):
if scope.symbols.data[h] != nil:
echo scope.symbols.data[h].name.s
if i == 2: break
inc i
proc searchInScopes*(c: PContext, s: PIdent, filter: TSymKinds): PSym =
for scope in walkScopes(c.currentScope):
result = strTableGet(scope.symbols, s)