KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > lex > NumericLiteral


1 package polyglot.lex;
2
3 import polyglot.util.Position;
4
5 /** A token class for numerical literals. */
6 public abstract class NumericLiteral extends Literal {
7   Number JavaDoc val;
8
9   public NumericLiteral(Position position, int sym) { super(position, sym); }
10
11   public Number JavaDoc getValue() { return val; }
12
13   public String JavaDoc toString() { return "numeric literal " + val.toString(); }
14 }
15
Popular Tags