public interface Scope
Modifier and Type | Field and Description |
---|---|
static String |
BUILT_IN |
static String |
GLOBAL |
static String |
LOCAL |
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 |
start(String token)
This method is used during context-aware parsing
to find multi-token symbols iteratively.
|
static final String BUILT_IN
static final String GLOBAL
static final String LOCAL
String getName()
Scope getParentScope()
void addChildScope(Scope scope)
scope
- Map<String,Scope> getChildScopes()
boolean define(Symbol symbol)
symbol
- Symbol resolve(String id)
id
- Symbol resolve(String[] qualifiedName)
qualifiedName
- void start(String token)
token
- boolean followUp(String token, boolean isPredict)
token
- Type getType()
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.