public class ArrayAssignExpr extends Expr
Modifier and Type | Field and Description |
---|---|
protected Expr |
expr
The righthand expression for assigning to the lefthand variable
|
protected Expr |
index
The index expression
|
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 |
---|
ArrayAssignExpr(int lineNum,
java.lang.String refName,
java.lang.String name,
Expr index,
Expr expr)
ArrayAssignExpr 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
|
Expr |
getIndex()
Get the index expression
|
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 index
protected Expr expr
public ArrayAssignExpr(int lineNum, java.lang.String refName, java.lang.String name, Expr index, 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 variableindex
- index expressionexpr
- righthand expression for assigning to the lefthand variablepublic java.lang.String getRefName()
public java.lang.String getName()
public Expr getIndex()
public Expr getExpr()