Class BlockNode

java.lang.Object
  extended by ASTNode
      extended by BlockNode

public class BlockNode
extends ASTNode

An AST node representing a block (procedure or function body): "decls BEGIN stmts END".


Nested Class Summary
 
Nested classes/interfaces inherited from class ASTNode
ASTNode.DataType
 
Field Summary
 java.util.List<DeclNode> decls
          List of variables, functions, and procedures declared locally in the block.
 java.util.List<StmtNode> stmts
          List of statements in the block.
 
Constructor Summary
BlockNode()
           
 
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
 

Field Detail

decls

public java.util.List<DeclNode> decls
List of variables, functions, and procedures declared locally in the block. May be a zero-length list, but must not be null.


stmts

public java.util.List<StmtNode> stmts
List of statements in the block. Must be a non-empty list.

Constructor Detail

BlockNode

public BlockNode()
Method Detail

unparse

public void unparse(java.io.PrintWriter p,
                    int level)
Prints a source representation of the tree rooted at this node on output stream p.

Specified by:
unparse in class ASTNode
Parameters:
p - the place to display the output.
level - the number of levels of indentation to use if the output requires more than one line.