Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
ScopeImpl() |
ScopeImpl(String name,
Scope parentScope) |
ScopeImpl(String name,
Scope parentScope,
Type type) |
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() |
Type |
getType()
maybe null.
|
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()
Scope
getParentScope
in interface Scope
public boolean define(Symbol symbol)
Scope
public Symbol resolve(String id)
Scope
public Symbol resolve(String[] qualifiedName)
Scope
public void setName(String name)
public void setParentScope(Scope parentScope)
public void addChildScope(Scope scope)
Scope
addChildScope
in interface Scope
public Map<String,Scope> getChildScopes()
Scope
getChildScopes
in interface Scope
public Map<String,Symbol> getSymbols()
getSymbols
in interface Scope
public void start(String token)
Scope
public boolean followUp(String token, boolean isPredict)
Scope
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.