Class ASTNode

java.lang.Object
  extended by ASTNode
Direct Known Subclasses:
BlockNode, DeclNode, ExprNode, StmtNode

public abstract class ASTNode
extends java.lang.Object

A node in an Abstract Syntax Tree for ada536.


Nested Class Summary
static class ASTNode.DataType
          Codes for ada536 data types
 
Constructor Summary
ASTNode()
           
 
Method Summary
protected  void indent(java.io.PrintWriter p, int level)
          A handy utility for generating a newline followed by the indentation for the next line.
abstract  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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTNode

public ASTNode()
Method Detail

unparse

public abstract void unparse(java.io.PrintWriter p,
                             int level)
Prints a source representation of the tree rooted at this node on output stream p.

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.

indent

protected void indent(java.io.PrintWriter p,
                      int level)
A handy utility for generating a newline followed by the indentation for the next line.

Parameters:
p - the place to display the output.
level - the number of levels to indent.