first implementation of suggest
This commit is contained in:
parent
5c7e3efbc3
commit
f7b2d71790
12 changed files with 54 additions and 25 deletions
|
|
@ -677,8 +677,19 @@ proc OpenScope(tab: var TSymTab) =
|
|||
Inc(tab.tos)
|
||||
|
||||
proc RawCloseScope(tab: var TSymTab) =
|
||||
Dec(tab.tos) #tab.stack[tab.tos] := nil;
|
||||
Dec(tab.tos)
|
||||
|
||||
iterator items*(tab: TStrTable): PSym =
|
||||
var it: TTabIter
|
||||
var s = InitTabIter(it, tab)
|
||||
while s != nil:
|
||||
yield s
|
||||
s = NextIter(it, tab)
|
||||
|
||||
iterator items*(tab: TSymTab): PSym =
|
||||
for i in countdown(tab.tos-1, 0):
|
||||
for it in items(tab.stack[i]): yield it
|
||||
|
||||
proc hasEmptySlot(data: TIdPairSeq): bool =
|
||||
for h in countup(0, high(data)):
|
||||
if data[h].key == nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue