|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ksu.cis.projects.bogor.ast.Node
edu.ksu.cis.projects.bogor.ast.Statement
edu.ksu.cis.projects.bogor.ast.ReturnStatement
public class ReturnStatement
The return statement AST.
| Field Summary | |
|---|---|
protected Exp |
exp
Holds the optional exp. |
| Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
|---|
ILLEGAL_LOCAL_ID_CHAR |
| Constructor Summary | |
|---|---|
ReturnStatement(Exp exp)
Default constructor. |
|
| Method Summary | |
|---|---|
ReturnStatement |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Disposes exp. |
Exp |
getOptionalExp()
Gets the exp. |
void |
setExp(Exp exp)
Sets the exp. |
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
| Constructor Detail |
|---|
public ReturnStatement(Exp exp)
exp - The exp.| Method Detail |
|---|
public ReturnStatement clone()
clone in class Statementpublic void dispose()
dispose in interface Disposabledispose in class Statementpublic Exp getOptionalExp()
public void setExp(Exp exp)
exp - The exp. Must be non-null.public void visit(ASTVisitor visitor)
visit in class Nodeprotected String toString(String indent)
toString in class Statementindent - The indentation for this statement.
"return [exp];\n".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||