| Modifier and Type | Class and Description |
|---|---|
class |
BaseScope
An abstract base class that houses common functionality for scopes.
|
class |
ClassSymbol
A symbol representing the class.
|
class |
DataAggregateSymbol
A symbol representing a collection of data like a struct or class.
|
class |
FunctionSymbol
This symbol represents a function ala C, not a method ala Java.
|
class |
GlobalScope
A scope associated with globals.
|
class |
LocalScope
A scope object typically associated with {...} code blocks
|
class |
MethodSymbol
A method symbol is a function that lives within an aggregate/class and has a slot number.
|
class |
PredefinedScope
A scope to hold predefined symbols of your language.
|
class |
SymbolWithScope
An abstract base class that houses common functionality for
symbols like classes and functions that are both symbols and scopes.
|
| Modifier and Type | Field and Description |
|---|---|
protected Scope |
BaseScope.enclosingScope |
protected Scope |
BaseSymbol.scope |
| Modifier and Type | Field and Description |
|---|---|
protected List<Scope> |
BaseScope.nestedScopesNotSymbols
All directly contained scopes, typically LocalScopes within a
LocalScope or a LocalScope within a FunctionSymbol.
|
| Modifier and Type | Method and Description |
|---|---|
Scope |
SymbolWithScope.getEnclosingScope() |
Scope |
Scope.getEnclosingScope()
Scope in which this scope defined.
|
Scope |
BaseScope.getEnclosingScope() |
Scope |
BaseScope.getOuterMostEnclosingScope()
Walk up enclosingScope until we find topmost.
|
Scope |
SymbolWithScope.getParentScope() |
Scope |
Scope.getParentScope()
Where to look next for symbols if just one parent; superclass or enclosing scope.
|
Scope |
ClassSymbol.getParentScope() |
Scope |
BaseScope.getParentScope() |
Scope |
SymbolWithScope.getScope() |
Scope |
Symbol.getScope() |
Scope |
BaseSymbol.getScope() |
| Modifier and Type | Method and Description |
|---|---|
List<Scope> |
BaseScope.getAllNestedScopedSymbols() |
List<Scope> |
Scope.getEnclosingPathToRoot()
Return (inclusive) list of all scopes on path to root scope.
|
List<Scope> |
BaseScope.getEnclosingPathToRoot() |
List<Scope> |
Scope.getNestedScopedSymbols()
Return all immediately enclosed scoped symbols in insertion order.
|
List<Scope> |
BaseScope.getNestedScopedSymbols() |
List<Scope> |
Scope.getNestedScopes()
Return a list of scopes nested within this scope.
|
List<Scope> |
BaseScope.getNestedScopes() |
List<Scope> |
Scope.getParentScopes()
Multiple superclass or interface implementations and the like...
|
List<Scope> |
BaseScope.getParentScopes() |
| Modifier and Type | Method and Description |
|---|---|
static void |
Utils.getAllNestedScopedSymbols(Scope scope,
List<Scope> scopes)
Order of scopes not guaranteed but is currently breadth-first according
to nesting depth.
|
static void |
Utils.getAllNestedScopes(Scope scope,
List<Scope> scopes)
Order of scopes not guaranteed but is currently breadth-first according
to nesting depth.
|
void |
Scope.nest(Scope scope)
Add a nested local scope to this scope; it's like define() but
for non SymbolWithScope objects.
|
void |
BaseScope.nest(Scope scope)
Add a nested scope to this scope; could also be a FunctionSymbol
if your language allows nested functions.
|
void |
Scope.setEnclosingScope(Scope s)
What scope encloses this scope.
|
void |
BaseScope.setEnclosingScope(Scope enclosingScope) |
void |
SymbolWithScope.setScope(Scope scope) |
void |
Symbol.setScope(Scope scope) |
void |
BaseSymbol.setScope(Scope scope) |
static String |
Utils.toQualifierString(Scope scope,
String separator)
Return a string of scope names with the "stack" growing to the right.
|
static String |
Utils.toScopeStackString(Scope scope,
String separator)
Return a string of scope names with the "stack" growing to the left
E.g., myblock:mymethod:myclass.
|
static String |
Utils.toString(Scope s) |
static String |
Utils.toString(Scope s,
int level) |
| Modifier and Type | Method and Description |
|---|---|
static void |
Utils.getAllNestedScopedSymbols(Scope scope,
List<Scope> scopes)
Order of scopes not guaranteed but is currently breadth-first according
to nesting depth.
|
static void |
Utils.getAllNestedScopes(Scope scope,
List<Scope> scopes)
Order of scopes not guaranteed but is currently breadth-first according
to nesting depth.
|
static String |
Utils.joinScopeNames(List<Scope> scopes,
String separator) |
| Constructor and Description |
|---|
BaseScope(Scope enclosingScope) |
GlobalScope(Scope scope) |
LocalScope(Scope enclosingScope) |
Copyright © 2016 ANTLR. All Rights Reserved.