public interface Scope extends Statement
| Modifier and Type | Method and Description |
|---|---|
Statement |
addStatement(Statement statement)
Add given statement to the current scope
|
void |
addVariable(Variable variable)
Add variable to the scope
|
Variable |
createVariable(VariableData variableData)
Create variable with given properties in the current scope
|
FramedScope |
getFramedScope()
Get parent frame
|
io.vavr.control.Option<Scope> |
getParentScope()
Get parent scope
|
default io.vavr.control.Option<StandardizedFramedScope> |
getStandardizedFramedScope() |
List<? extends Statement> |
getStatements()
Get all statements
|
io.vavr.control.Option<Variable> |
getVariable(String name)
Get variable with the given name
|
List<? extends Variable> |
getVariables()
Get variables
|
boolean |
hasEffective(Class<? extends Statement> statementClass)
Check if scope has effective (statement that is always reachable) statement of the given type
|
boolean |
removeVariable(String name)
Remove variable with the given name
|
getSourceLocationStatement addStatement(Statement statement)
statement - the statement to addboolean hasEffective(Class<? extends Statement> statementClass)
statementClass - type of statements to search forVariable createVariable(VariableData variableData)
variableData - the data about variablevoid addVariable(Variable variable)
variable - the variable to addboolean removeVariable(String name)
name - the name of variable to search forio.vavr.control.Option<Variable> getVariable(String name)
name - the name to search forList<? extends Statement> getStatements()
io.vavr.control.Option<Scope> getParentScope()
default io.vavr.control.Option<StandardizedFramedScope> getStandardizedFramedScope()
FramedScope getFramedScope()
Copyright © 2020. All rights reserved.