|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--antlr.BaseAST
|
+--antlr.CommonAST
|
+--org.omegahat.Environment.Parser.Parse.BasicExpression
|
+--org.omegahat.Environment.Parser.Parse.List
|
+--org.omegahat.Environment.Parser.Parse.StatementList
This class is used to gather an ordered collection of expressions into a unit such as the body of a loop, etc. It is designed to evaluate the elements sequentially and also to take care of attaching a temporary database for local declarations and assignments within this block.
| Field Summary | |
protected Database |
db
|
protected int |
DepthForLocalVariables
|
protected boolean |
handleLocalFrame
|
| Fields inherited from class org.omegahat.Environment.Parser.Parse.List |
elements, separator |
| Fields inherited from class org.omegahat.Environment.Parser.Parse.BasicExpression |
children, comments, isActive, parent, POST, PRE |
| Fields inherited from class antlr.BaseAST |
down, right |
| Constructor Summary | |
StatementList()
|
|
StatementList(antlr.collections.AST els,
boolean down)
|
|
StatementList(java.lang.Object el)
|
|
| Method Summary | |
boolean |
close(Evaluator evaluator)
|
boolean |
definesLocalVariables(Evaluator evaluator)
|
java.lang.Object |
eval(Evaluator evaluator)
Evaluate this object by evaluating each of its elements, where possible. |
List |
getComments()
Get the formal comments from the collection of statements. |
List |
getComments(boolean onlyFormals)
Get all or just the formal comments from the list of expressions. |
antlr.collections.AST |
getFirstChild()
|
boolean |
handleLocalFrame()
|
boolean |
handleLocalFrame(boolean val)
|
java.lang.String |
separator()
|
java.lang.String |
toString()
|
| Methods inherited from class org.omegahat.Environment.Parser.Parse.List |
addElement, addElements, addElements, addElements, addResult, asString, asString, asString, clear, clone, contains, copyElements, elementAt, elements, elementToString, eval, evalElement, evalElement, evalResult, getReferencedVariables, lastElement, parent, separator, setElementAt, size, size, subset, subset, subset, toArray, toString |
| Methods inherited from class org.omegahat.Environment.Parser.Parse.BasicExpression |
addChild, addComment, apply, apply, apply, children, children, comment, comment, depth, error, eval, evalInit, evaluationFrame, evaluator, getReferencedVariables, getReferencedVariables, isActive, isActive, parent, postComment, postComment, preComment, preComment, render, replaceChild, resolve, run, setParent, setParent, setParent, setParent, showComments, showComments, substitute, substitute |
| Methods inherited from class antlr.CommonAST |
getText, getType, initialize, initialize, initialize, setText, setType |
| Methods inherited from class antlr.BaseAST |
addChild, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getNextSibling, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.omegahat.Environment.Parser.Parse.ExpressionInt |
error, resolve, substitute |
| Methods inherited from interface org.omegahat.Environment.Parser.Parse.TreeNodeInt |
addChild, children, depth, parent, replaceChild |
| Methods inherited from interface org.omegahat.Environment.Language.Evaluable |
eval |
| Field Detail |
protected boolean handleLocalFrame
protected Database db
protected int DepthForLocalVariables
| Constructor Detail |
public StatementList()
public StatementList(java.lang.Object el)
public StatementList(antlr.collections.AST els,
boolean down)
| Method Detail |
public java.lang.Object eval(Evaluator evaluator)
throws java.lang.Throwable
Listeval in class Listpublic boolean close(Evaluator evaluator)
public boolean definesLocalVariables(Evaluator evaluator)
public boolean handleLocalFrame()
public boolean handleLocalFrame(boolean val)
public List getComments(boolean onlyFormals)
Note that because of the way comments are linked, adjacent comments will appear as a single entry and will be printed as multiple comments. This is true of all comment types, irrespective of whether we want formals or not and is inescapable given the current framework for comments. Of course, that can easily be changed.
onlyFormals - indicates whether to restrict the retrieved
comments to the javadoc-style comments
or all comments.public List getComments()
getComments(boolean)public java.lang.String separator()
separator in class Listpublic java.lang.String toString()
toString in class Listpublic antlr.collections.AST getFirstChild()
getFirstChild in class List
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||