|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.ast.ASTree
coins.ast.ASTList
coins.ast.expr.ArrayInitializer
An array of initial values.
For example, the initializing expression in the following code:
int a[] = { 1, 2, 3, 4 };
is represented as a linked-list of ConstantExpr
objects representing 1, 2, 3, and 4.
A structure also takes an array of initial values:
struct price list[] = { { "book", 500 }, { "coffee", 200 } };
is represented as a linked-list of two ArrayInitializer
objects. Each of them contains a StringLiteral and a
ConstantExpr.
| Constructor Summary | |
ArrayInitializer(Expr expr,
byte[] _type)
|
|
| Method Summary | |
void |
accept(Visitor v)
Is a method for the visitor pattern. |
static ArrayInitializer |
append(ArrayInitializer init,
Expr expr,
byte[] type)
|
byte[] |
getType()
Returns the type of the resulting value of evaluating the expression. |
| Methods inherited from class coins.ast.ASTList |
append, concat, getLeft, getRight, getTag, head, rightToString, setHead, setLeft, setRight, setTail, subst, tail |
| Methods inherited from class coins.ast.ASTree |
putSeparator, toString, toString1 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ArrayInitializer(Expr expr,
byte[] _type)
| Method Detail |
public void accept(Visitor v)
ASTreeatXXX() on the given visitor, where
XXX is the class name of the node object.
accept in class ASTListpublic byte[] getType()
Expr
getType in interface Expr
public static ArrayInitializer append(ArrayInitializer init,
Expr expr,
byte[] type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||