|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectast.ASTNode
ast.Expr
ast.AssignExpr
public class AssignExpr
The AssignExpr class represents assignment expressions. It contains an optional reference name (potentially needed if the variable is a field), a variable name (variable being assigned to) and an expression (for assigning to the variable).
ASTNode,
Expr| Field Summary | |
|---|---|
protected Expr |
expr
The righthand expression for assigning to the lefthand variable |
protected java.lang.String |
name
The name of the lefthand variable |
protected java.lang.String |
refName
The optional reference object used to access the lefthand variable (only applicable if the variable is a field) |
| Fields inherited from class ast.ASTNode |
|---|
charNum, lineNum, lineStr |
| Constructor Summary | |
|---|---|
AssignExpr(int lineNum,
java.lang.String refName,
java.lang.String name,
Expr expr)
AssignExpr constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
accept(Visitor v)
Visitor method |
Expr |
getExpr()
Get the righthand expression of the assignment |
java.lang.String |
getName()
Get the lefthand variable name |
java.lang.String |
getRefName()
Get the optional reference name |
| Methods inherited from class ast.Expr |
|---|
getExprType, setExprType |
| 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 java.lang.String refName
protected java.lang.String name
protected Expr expr
| Constructor Detail |
|---|
public AssignExpr(int lineNum,
java.lang.String refName,
java.lang.String name,
Expr expr)
lineNum - source line number corresponding to this AST noderefName - the optional reference object used to access the lefthand variablename - the name of the lefthand variableexpr - righthand expression for assigning to the lefthand variable| Method Detail |
|---|
public java.lang.String getRefName()
public java.lang.String getName()
public Expr getExpr()
public java.lang.Object accept(Visitor v)
accept in class Exprv - visitor object
Visitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||