|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectast.ASTNode
ast.Stmt
ast.ReturnStmt
public class ReturnStmt
The ReturnStmt class represents a return statement within the body of a method. It contains an expression to be returned (expr).
ASTNode,
Stmt| Field Summary | |
|---|---|
protected Expr |
expr
An expression to be returned (null for no return expression) |
| Fields inherited from class ast.ASTNode |
|---|
charNum, lineNum, lineStr |
| Constructor Summary | |
|---|---|
ReturnStmt(int lineNum,
Expr expr)
ReturnStmt constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
accept(Visitor v)
Visitor method |
Expr |
getExpr()
Get the return expression |
| Methods inherited from class ast.ASTNode |
|---|
getLineNum |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Expr expr
| Constructor Detail |
|---|
public ReturnStmt(int lineNum,
Expr expr)
lineNum - source line number corresponding to this AST nodeexpr - expression to be returned (null for no return expression)| Method Detail |
|---|
public Expr getExpr()
public java.lang.Object accept(Visitor v)
accept in class Stmtv - visitor object
Visitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||