Class LiteralNode

java.lang.Object
  extended by ASTNode
      extended by ExprNode
          extended by LiteralNode

public class LiteralNode
extends ExprNode

An AST node representing an integer, string, or Boolean literal (constant).


Nested Class Summary
 
Nested classes/interfaces inherited from class ASTNode
ASTNode.DataType
 
Constructor Summary
LiteralNode(java.lang.Object value)
          Creates a new LiteralNode.
 
Method Summary
 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 ASTNode
indent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteralNode

public LiteralNode(java.lang.Object value)
Creates a new LiteralNode.

Parameters:
value - the value of the literal. May be an Integer, a String, or a Boolean.
Method Detail

unparse

public void unparse(java.io.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.