comp
Class ArrayRefNode
java.lang.Object
|
+--comp.Node
|
+--comp.ExprNode
|
+--comp.ArrayRefNode
- class ArrayRefNode
- extends ExprNode
An array reference expression.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
left
ExprNode left
index
ExprNode index
ArrayRefNode
public ArrayRefNode(ExprNode left,
ExprNode index)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getType
public Type getType(Scope s)
- Overrides:
getType
in class ExprNode
codeGen
public java.lang.String codeGen(Scope scope,
RegBank bank)
- Read the array reference.
- Specified by:
codeGen
in class Node
lvalue
public java.lang.String lvalue(Scope scope,
RegBank bank)
- Returns the address of this array reference.
- Overrides:
lvalue
in class Node
asHTML
public void asHTML(java.io.PrintStream out)
- Process this node.
- Specified by:
asHTML
in class Node