CS 536 Fall 2007, Project 5

Class DeclNode

Object
  extended by ASTNode
      extended by DeclNode
Direct Known Subclasses:
ProcDeclNode, VarDeclNode

public abstract class DeclNode
extends ASTNode

An AST node representing a declaration of a function, procedure, or variable.


Nested Class Summary
 
Nested classes/interfaces inherited from class ASTNode
ASTNode.Opcode
 
Field Summary
 ProcDeclNode enclosingProc
          Pointer to the smallest enclosing procedure or function, if any.
 
Constructor Summary
DeclNode()
           
 
Method Summary
 void codeGen(StmtNode loop)
          Generates code for this declaration 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, if any. For the top-level procedure, this field null.

Constructor Detail

DeclNode

public DeclNode()
Method Detail

codeGen

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

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

CS 536 Fall 2007, Project 5