* Contributor(s): Roger Lawrence, Mike McCabe
*/
+// FIXME: mark lots of these methods 'final' so they get inlined
+
package org.xwt.js;
import java.io.*;
/** the token that was just parsed */
protected int op;
+
+ /** the most recently parsed token, <i>regardless of pushbacks</i> */
+ protected int mostRecentlyReadToken;
/** if the token just parsed was a NUMBER, this is the numeric value */
protected Number number = null;
public int getToken() throws IOException {
number = null;
string = null;
- if (pushBackDepth == 0) return op = _getToken();
+ if (pushBackDepth == 0) {
+ mostRecentlyReadToken = op;
+ return op = _getToken();
+ }
pushBackDepth--;
op = pushBackInts[pushBackDepth];
if (pushBackObjects[pushBackDepth] != null) {