First try for AST structure. A lot of things to change
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / NumberLiteral.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NumberLiteral.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/NumberLiteral.java
new file mode 100644 (file)
index 0000000..1295638
--- /dev/null
@@ -0,0 +1,26 @@
+package net.sourceforge.phpdt.internal.compiler.ast;
+
+/**
+ * Literal for numbers
+ * @author Matthieu Casanova
+ */
+public class NumberLiteral extends Literal {
+  public char[] source;
+
+  public NumberLiteral(char[] token, int sourceStart, int sourceEnd) {
+    super(sourceStart, sourceEnd);
+    source = token;
+  }
+
+  public char[] source() {
+    return source;
+  }
+
+  /**
+   * Return the expression as String.
+   * @return the expression
+   */
+  public String toStringExpression() {
+    return new String(source);
+  }
+}