| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
ScopeImpl() |
ScopeImpl(String name,
Scope parentScope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildScope(Scope scope)
Adds an enclosed (child) scope
|
boolean |
define(Symbol symbol)
Defines a new symbol in this scope
|
boolean |
followUp(String token,
boolean isPredict)
This method is used during context-aware parsing
to find multi-token symbols iteratively.
|
Map<String,Scope> |
getChildScopes()
Gets a map of all children scopes.
|
String |
getName()
Returns the scope name
|
Scope |
getParentScope()
Returns the enclosing (parent) scope
|
Map<String,Symbol> |
getSymbols() |
Symbol |
resolve(String id)
Searches and returns a symbol with the given
id if it exists.
|
Symbol |
resolve(String[] qualifiedName)
Searches and returns a symbol with the given
qualified name if it exists.
|
void |
setChildScopes(Map<String,Scope> childScopes) |
void |
setName(String name) |
void |
setParentScope(Scope parentScope) |
void |
start(String token)
This method is used during context-aware parsing
to find multi-token symbols iteratively.
|
String |
toString() |
public Scope getParentScope()
ScopegetParentScope in interface Scopepublic boolean define(Symbol symbol)
Scopepublic Symbol resolve(String id)
Scopepublic Symbol resolve(String[] qualifiedName)
Scopepublic void setName(String name)
public void setParentScope(Scope parentScope)
public void addChildScope(Scope scope)
ScopeaddChildScope in interface Scopepublic Map<String,Scope> getChildScopes()
ScopegetChildScopes in interface Scopepublic Map<String,Symbol> getSymbols()
getSymbols in interface Scopepublic void start(String token)
Scopepublic boolean followUp(String token, boolean isPredict)
ScopeCopyright © 2001–2017 JBoss by Red Hat. All rights reserved.