public class BoundScope extends Object
Scopes form a tree structure mirroring the lexical nesting of SQL/PL/SQL constructs. Each scope maintains its own symbol table for name resolution.
| Constructor and Description |
|---|
BoundScope(EScopeKind kind,
BoundScope parent,
SourceAnchor anchor) |
| Modifier and Type | Method and Description |
|---|---|
void |
declareSymbol(String name,
BoundSymbol symbol)
Declares a symbol in this scope.
|
SourceAnchor |
getAnchor() |
List<BoundScope> |
getChildren() |
EScopeKind |
getKind() |
BoundScope |
getParent() |
long |
getScopeId() |
Map<String,BoundSymbol> |
getSymbols()
Returns all symbols declared in this scope.
|
BoundSymbol |
lookup(String name)
Looks up a symbol by searching this scope and all ancestor scopes.
|
BoundSymbol |
lookupLocal(String name)
Looks up a symbol in this scope only (no parent search).
|
static void |
resetIdGenerator()
Resets the scope ID generator.
|
String |
toString() |
public BoundScope(EScopeKind kind, BoundScope parent, SourceAnchor anchor)
public long getScopeId()
public BoundScope getParent()
public EScopeKind getKind()
public List<BoundScope> getChildren()
public SourceAnchor getAnchor()
public void declareSymbol(String name, BoundSymbol symbol)
public BoundSymbol lookupLocal(String name)
public BoundSymbol lookup(String name)
public Map<String,BoundSymbol> getSymbols()
public static void resetIdGenerator()