|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.ast.Node edu.ksu.cis.projects.bogor.ast.Statement edu.ksu.cis.projects.bogor.ast.WhileStatement
public class WhileStatement
The while statement AST.
Field Summary | |
---|---|
protected Exp |
exp
Holds the condition. |
protected Statement |
stmt
Holds the statement. |
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
WhileStatement(Exp exp,
Statement stmt)
Default constructor. |
Method Summary | |
---|---|
WhileStatement |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Disposes exp and stmt. |
Exp |
getExp()
Gets the condition. |
Statement |
getStatement()
Gets the statement. |
void |
setExp(Exp exp)
Sets the condition. |
void |
setStatement(Statement stmt)
Sets the statement. |
protected String |
toString(String indent)
Returns the string representation of this object. |
void |
visit(ASTVisitor visitor)
|
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Statement |
---|
getParent, setParent, toString |
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
getLocationInfo, getProperty, putProperty, setLocationInfo |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Exp exp
protected Statement stmt
Constructor Detail |
---|
public WhileStatement(Exp exp, Statement stmt)
exp
- The condition. Must be non-null.stmt
- The statement. Must be non-null.Method Detail |
---|
public WhileStatement clone()
clone
in class Statement
public void dispose()
dispose
in interface Disposable
dispose
in class Statement
public Exp getExp()
public void setExp(Exp exp)
exp
- The condition. Must be non-null.public Statement getStatement()
public void setStatement(Statement stmt)
stmt
- The statement. Must be non-null.public void visit(ASTVisitor visitor)
visit
in class Node
protected String toString(String indent)
toString
in class Statement
indent
- The indentation for this statement.
"while exp do\n" + " stmt\n" + "end\n".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |