2003/06/03 08:56:56
[org.ibex.core.git] / src / org / xwt / js / Lexer.java
index d7a5725..3a80f5a 100644 (file)
@@ -482,7 +482,7 @@ class Lexer {
     int[] pushBackInts = new int[10];
     Object[] pushBackObjects = new Object[10];
 
-    public void pushBackToken() {
+    public void pushBackToken(int op, Object obj) {
        if (pushBackDepth >= pushBackInts.length - 1) {
            int[] newInts = new int[pushBackInts.length * 2];
            System.arraycopy(pushBackInts, 0, newInts, 0, pushBackInts.length);
@@ -492,10 +492,12 @@ class Lexer {
            pushBackObjects = newObjects;
        }
        pushBackInts[pushBackDepth] = op;
-       pushBackObjects[pushBackDepth] = number != null ? (Object)number : (Object)string;
+       pushBackObjects[pushBackDepth] = obj;
        pushBackDepth++;
     }
 
+    public void pushBackToken() { pushBackToken(op, number != null ? (Object)number : (Object)string); }
+
     public int peekToken() throws IOException {
        int ret = getToken();
        pushBackToken();