Class ForStmtNode

java.lang.Object
  extended by ASTNode
      extended by StmtNode
          extended by ForStmtNode

public class ForStmtNode
extends StmtNode

An AST node representing a for statement: "FOR variable IN low DOTDOT high LOOP stmts END LOOP;".


Nested Class Summary
 
Nested classes/interfaces inherited from class ASTNode
ASTNode.DataType
 
Constructor Summary
ForStmtNode(IdNode id, ExprNode low, ExprNode high, java.util.List<StmtNode> body)
          Creates a new ForStmtNode.
 
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

ForStmtNode

public ForStmtNode(IdNode id,
                   ExprNode low,
                   ExprNode high,
                   java.util.List<StmtNode> body)
Creates a new ForStmtNode.

Parameters:
id - the bound variable
low - the lower bound
high - the higher bound
body - the body of the loop.
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.