Class IfStmtNode

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

public class IfStmtNode
extends StmtNode

An AST node representing an "if" statement: "IF cond THEN stmts [ELSIF stmts]* [ELSE stmts]? END IF;".


Nested Class Summary
static class IfStmtNode.IfThen
          A condition and corresponding sequence of statements corresponding to an if/then or elsif/then clause of an if statement.
 
Nested classes/interfaces inherited from class ASTNode
ASTNode.DataType
 
Constructor Summary
IfStmtNode(IfStmtNode.IfThen head, java.util.List<IfStmtNode.IfThen> elsifs, java.util.List<StmtNode> elseClause)
          Creates a new IfStmtNode.
 
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

IfStmtNode

public IfStmtNode(IfStmtNode.IfThen head,
                  java.util.List<IfStmtNode.IfThen> elsifs,
                  java.util.List<StmtNode> elseClause)
Creates a new IfStmtNode.

Parameters:
head - the head "if ... then ..."
elsifs - list of "elsif ... then ..." clauses (may be empty)
elseClause - the body of the "else" clause (my be null)
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.