package net.sourceforge.phpdt.internal.compiler.ast;
+import test.Token;
+
/**
- * Literal for numbers
+ * Literal for numbers.
* @author Matthieu Casanova
*/
public class NumberLiteral extends Literal {
- public char[] source;
+ public String source;
- public NumberLiteral(final char[] token,
- final int sourceStart,
- final int sourceEnd) {
- super(sourceStart, sourceEnd);
- source = token;
- }
-
- public char[] source() {
- return source;
+ public NumberLiteral(final Token token) {
+ super(token.sourceStart, token.sourceEnd);
+ source = token.image;
}
/**
* @return the expression
*/
public String toStringExpression() {
- return new String(source);
+ return source;
}
}