get rid of the SymTab* procs in astalgo
This commit is contained in:
parent
9a6f47ae69
commit
3d1c6de638
11 changed files with 91 additions and 133 deletions
|
|
@ -82,7 +82,7 @@ proc Lookup(c: PContext, n: PNode, flags: TSemGenericFlags,
|
|||
ctx: var TIntSet): PNode =
|
||||
result = n
|
||||
let ident = considerAcc(n)
|
||||
var s = SymtabGet(c.Tab, ident)
|
||||
var s = searchInScopes(c, ident)
|
||||
if s == nil:
|
||||
if ident.id notin ctx and withinMixin notin flags:
|
||||
localError(n.info, errUndeclaredIdentifier, ident.s)
|
||||
|
|
@ -281,7 +281,7 @@ proc semGenericStmt(c: PContext, n: PNode,
|
|||
of nkEnumFieldDef: a = n.sons[i].sons[0]
|
||||
of nkIdent: a = n.sons[i]
|
||||
else: illFormedAst(n)
|
||||
addDeclAt(c, newSymS(skUnknown, getIdentNode(a.sons[i]), c), c.tab.tos-1)
|
||||
addDecl(c, newSymS(skUnknown, getIdentNode(a.sons[i]), c))
|
||||
of nkObjectTy, nkTupleTy:
|
||||
nil
|
||||
of nkFormalParams:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue