CS 536 Fall 2007, Project 5

Class StmtNode

Object
  extended by ASTNode
      extended by StmtNode
Direct Known Subclasses:
AssignStmtNode, CallStmtNode, ExitStmtNode, ForStmtNode, IfStmtNode, NullStmtNode, ReadStmtNode, ReturnStmtNode, WhileStmtNode, WriteStmtNode

public abstract class StmtNode
extends ASTNode

An AST node representing a statement of some sort.


Nested Class Summary
 
Nested classes/interfaces inherited from class ASTNode
ASTNode.Opcode
 
Field Summary
 ProcDeclNode enclosingProc
          Pointer to the smallest enclosing procedure or function.
 String exitLabel
          Exit label.
 
Constructor Summary
StmtNode()
           
 
Method Summary
 void codeGen(StmtNode loop)
          Generates code for this node and all descendants.
 
Methods inherited from class ASTNode
indent, resolveNames, resolveTypes, toString, unparse
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

enclosingProc

public ProcDeclNode enclosingProc
Pointer to the smallest enclosing procedure or function.


exitLabel

public String exitLabel
Exit label. Only used for WhileStmtNode and ForStmtNode.

Constructor Detail

StmtNode

public StmtNode()
Method Detail

codeGen

public void codeGen(StmtNode loop)
Generates code for this node and all descendants.

Parameters:
loop - the smallest enclosing ForStmtNode or WhileStmtNode, if any.

CS 536 Fall 2007, Project 5