improve wall filter

This commit is contained in:
wenshao
2013-04-01 20:05:46 +08:00
parent 7a49a6ce35
commit 032c5762e2
46 changed files with 1653 additions and 222 deletions
@@ -68,10 +68,20 @@ public class Lexer {
private int varIndex = -1;
protected CommentHandler commentHandler;
public Lexer(String input){
this(input, true);
}
public CommentHandler getCommentHandler() {
return commentHandler;
}
public void setCommentHandler(CommentHandler commentHandler) {
this.commentHandler = commentHandler;
}
public final char charAt(int index) {
if (index >= text.length()) {
return EOI;
@@ -1008,4 +1018,9 @@ public class Lexer {
public BigDecimal decimalValue() {
return new BigDecimal(text.toCharArray(), mark, bufPos);
}
public static interface CommentHandler {
boolean handle(Token lastToken, String comment);
}
}