public class ArrayExpr extends Expr
Modifier and Type | Field and Description |
---|---|
protected Expr |
index
The index expression
|
protected java.lang.String |
name
The name of the variable (possibly 'this', 'super', or 'null')
|
protected Expr |
ref
The optional reference object (must be 'this' or 'super')
|
Constructor and Description |
---|
ArrayExpr(int lineNum,
Expr ref,
java.lang.String name,
Expr index)
ArrayExpr constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method
|
Expr |
getIndex()
Get the index expression
|
java.lang.String |
getName()
Get the name of the array
|
Expr |
getRef()
Get the reference object
Only applicable if array is a field (otherwise this returns null)
|
getExprType, setExprType
getLineNum
protected Expr ref
protected java.lang.String name
protected Expr index
public Expr getRef()
public java.lang.String getName()
public Expr getIndex()