Class DeclNode
Object
ASTNode
DeclNode
- Direct Known Subclasses:
- ProcDeclNode, VarDeclNode
public abstract class DeclNode
- extends ASTNode
An AST node representing a declaration of a function, procedure, or
variable.
Method Summary |
void |
codeGen(StmtNode loop)
Generates code for this declaration and all descendants. |
enclosingProc
public ProcDeclNode enclosingProc
- Pointer to the smallest enclosing procedure or function, if any.
For the top-level procedure, this field null.
DeclNode
public DeclNode()
codeGen
public void codeGen(StmtNode loop)
- Generates code for this declaration and all descendants.
- Parameters:
loop
- the smallest enclosing ForStmtNode or WhileStmtNode, if any.