improved sql parser.

This commit is contained in:
wenshao
2017-05-21 11:28:30 +08:00
parent 869c45695b
commit 8b51ecf021
90 changed files with 1135 additions and 857 deletions
@@ -191,6 +191,17 @@ public class SQLExprParser extends SQLParser {
return intExpr;
}
public int parseIntValue() {
if (lexer.token() == Token.LITERAL_INT) {
Number number = this.lexer.integerValue();
int intVal = ((Integer) number).intValue();
lexer.nextToken();
return intVal;
} else {
throw new ParserException("not int. " + lexer.info());
}
}
public SQLExpr primary() {
List<String> beforeComments = null;
if (lexer.isKeepComments() && lexer.hasComment()) {