|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectASTNode
DeclNode
VarDeclNode
public class VarDeclNode
An AST node representing a variable declaration: "id : type;" or "id : ARRAY (INT DOTDOT INT) OF type;".
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ASTNode |
---|
ASTNode.DataType |
Constructor Summary | |
---|---|
VarDeclNode(IdNode id,
ASTNode.DataType varType,
int size)
Creates a new VarDeclNode. |
Method Summary | |
---|---|
void |
unparse(java.io.PrintWriter p,
int level)
Prints a source representation of the tree rooted at this node on output stream p. |
Methods inherited from class ASTNode |
---|
indent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VarDeclNode(IdNode id, ASTNode.DataType varType, int size)
id
- the base variable.varType
- the type of the variable,
for example ASTNode.DataType.INT_TYPE.size
- the size of the array. -1 means it is a scalar variable.Method Detail |
---|
public void unparse(java.io.PrintWriter p, int level)
unparse
in class ASTNode
p
- the place to display the output.level
- the number of levels of indentation to use if the output
requires more than one line.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |