improve performance

This commit is contained in:
wenshao
2013-01-13 00:13:41 +08:00
parent 2c25af9bc1
commit e7d570de37
2 changed files with 37 additions and 2 deletions
@@ -41,7 +41,7 @@ import java.util.Arrays;
*/
public class Lexer {
private final String text;
protected final String text;
protected int pos;
protected int mark;
@@ -78,6 +78,10 @@ public class Lexer {
return text.charAt(index);
}
public final int indexOf(char ch, int fromIndex) {
return text.indexOf(ch, fromIndex);
}
public String addSymbol() {
return subString(mark, bufPos);