|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectast.ASTNode
ast.Expr
ast.ArrayAssignExpr
public class ArrayAssignExpr
The ArrayAssignExpr class represents array assignment expressions. It contains an optional reference name (potentially needed if the variable is a field), an array name (array being assigned to), an index expression (index into assigned array), and an expression (for assigning to the array).
ASTNode
,
Expr
Field Summary | |
---|---|
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) |
Fields inherited from class ast.ASTNode |
---|
charNum, lineNum, lineStr |
Constructor Summary | |
---|---|
ArrayAssignExpr(int lineNum,
java.lang.String refName,
java.lang.String name,
Expr index,
Expr expr)
ArrayAssignExpr constructor |
Method Summary | |
---|---|
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 |
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 index
protected Expr expr
Constructor Detail |
---|
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 variableMethod Detail |
---|
public java.lang.String getRefName()
public java.lang.String getName()
public Expr getIndex()
public Expr getExpr()
public java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
accept
in class Expr
v
- visitor objecto
- object to pass down
Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |