Modifier and Type | Field and Description |
---|---|
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)
|
Constructor and Description |
---|
AssignExpr(int lineNum,
java.lang.String refName,
java.lang.String name,
Expr expr)
AssignExpr constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
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
|
getExprType, setExprType
getLineNum
protected java.lang.String refName
protected java.lang.String name
protected Expr expr
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 variablepublic java.lang.String getRefName()
public java.lang.String getName()
public Expr getExpr()