Class NullStmtNode
Object
ASTNode
StmtNode
NullStmtNode
public class NullStmtNode
- extends StmtNode
An AST node representing a null statement: "null;".
Constructor Summary |
NullStmtNode(int line,
int column)
Creates a new NullStmtNode. |
Method Summary |
void |
codeGen(StmtNode loop)
Does nothing (no code needed for this statement). |
void |
resolveNames(SymbolTable symtab)
Resolves all applied uses of identifiers in the tree rooted at this
node. |
void |
resolveTypes(ProcDeclNode proc)
Fills in types for all Symbols bound to IdNodes. |
void |
unparse(PrintWriter p,
int level)
Prints a source representation of the tree rooted at this node on
output stream p. |
NullStmtNode
public NullStmtNode(int line,
int column)
- Creates a new NullStmtNode.
- Parameters:
line
- the line of the first thing after the NULL keyword.column
- the column of the first thing after the NULL keyword.
unparse
public void unparse(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.
resolveNames
public void resolveNames(SymbolTable symtab)
- Resolves all applied uses of identifiers in the tree rooted at this
node.
- Specified by:
resolveNames
in class ASTNode
- Parameters:
symtab
- the symbol table to be used.
resolveTypes
public void resolveTypes(ProcDeclNode proc)
- Fills in types for all Symbols bound to IdNodes. Prints error messages
as necessary.
- Specified by:
resolveTypes
in class ASTNode
- Parameters:
proc
- the smallest enclosing procedure or function declaration.
codeGen
public void codeGen(StmtNode loop)
- Does nothing (no code needed for this statement).
- Overrides:
codeGen
in class StmtNode
- Parameters:
loop
- the smallest enclosing ForStmtNode or WhileStmtNode, if any.