X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fjs%2FLexer.java;fp=src%2Forg%2Fxwt%2Fjs%2FLexer.java;h=f08ebce6cb0bb37bccd5192a5da638f3a3ced742;hb=77f51cd3e157cf6fd2ae85ce774444bb85ea7b81;hp=1fa432d8befeff4bcae14618852360951842c687;hpb=1d78b2dbeba31c5814824035a8da36a01d928be6;p=org.ibex.core.git diff --git a/src/org/xwt/js/Lexer.java b/src/org/xwt/js/Lexer.java index 1fa432d..f08ebce 100644 --- a/src/org/xwt/js/Lexer.java +++ b/src/org/xwt/js/Lexer.java @@ -17,8 +17,6 @@ * Contributor(s): Roger Lawrence, Mike McCabe */ -// FIXME: mark lots of these methods 'final' so they get inlined - package org.xwt.js; import java.io.*; @@ -285,7 +283,7 @@ class Lexer implements Tokens { return STRING; } - public int _getToken() throws IOException { + private int _getToken() throws IOException { int c; do { c = in.read(); } while (c == '\u0020' || c == '\u0009' || c == '\u000C' || c == '\u000B' || c == '\n' ); if (c == -1) return -1; @@ -381,7 +379,7 @@ class Lexer implements Tokens { private Object[] pushBackObjects = new Object[10]; /** push back a token */ - public void pushBackToken(int op, Object obj) { + public final 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); @@ -396,17 +394,17 @@ class Lexer implements Tokens { } /** push back the most recently read token */ - public void pushBackToken() { pushBackToken(op, number != null ? (Object)number : (Object)string); } + public final void pushBackToken() { pushBackToken(op, number != null ? (Object)number : (Object)string); } /** read a token but leave it in the stream */ - public int peekToken() throws IOException { + public final int peekToken() throws IOException { int ret = getToken(); pushBackToken(); return ret; } /** read a token */ - public int getToken() throws IOException { + public final int getToken() throws IOException { number = null; string = null; if (pushBackDepth == 0) {