aspoev.interpreter.base
Class BlockElement
java.lang.Object
aspoev.interpreter.base.Element
aspoev.interpreter.base.StatementElement
aspoev.interpreter.base.BlockElement
- All Implemented Interfaces:
- java.lang.Cloneable, aspoev.Executable, pJ.jasmine.PRI, java.io.Serializable
- public class BlockElement
- extends StatementElement
- implements pJ.jasmine.PRI
This Element is the AST equivalent of a c-style block, delineated
by '{' and '}'. Although you might think that a
MethodInvokationElement would contain its body, the
StatementElements to be executed by the method are actually
delegated to this class. It calls upon the current
ExecutionEnvironment to push scope before it executes, and pop
scope after it executes. This effectively gives variables a
limited lifetime. Variables can be returned from a BlockElement by
means of a ReturnElement, created with the keyword 'return' in
vejal.
- See Also:
- Serialized Form
|
Field Summary |
protected aspoev.interpreter.base.ExecutionIterator |
execution
|
protected pJ.jasmine.ListOfObject |
statements
|
| Fields inherited from class aspoev.interpreter.base.Element |
parent |
| Fields inherited from interface pJ.jasmine.PRI |
DELETECHANGE, MODIFYCHANGE, NOCHANGE |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
statements
protected pJ.jasmine.ListOfObject statements
execution
protected transient aspoev.interpreter.base.ExecutionIterator execution
BlockElement
public BlockElement()
addStatement
public void addStatement(StatementElement statement)
- Called by generated parser aspoev.interpreter.parser.VejalParser
clone
public java.lang.Object clone()
- Specified by:
clone in class Element
executeElement
protected java.lang.Object executeElement()
- Overrides:
executeElement in class StatementElement
getChildrenByType
public java.util.Collection getChildrenByType(java.lang.Class childClass)
- Specified by:
getChildrenByType in class Element
stepBackExecution
public boolean stepBackExecution()
getCodeString
public java.lang.String getCodeString()
- Specified by:
getCodeString in class Element
toString
public java.lang.String toString()
- Overrides:
toString in class Element