fixes #1944
This commit is contained in:
parent
d3a8d5b173
commit
5f6131cbdc
4 changed files with 36 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue