mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve mysql sql parser formance
This commit is contained in:
@@ -187,7 +187,40 @@ public class Lexer {
|
||||
public String info() {
|
||||
return this.token + " " + this.stringVal();
|
||||
}
|
||||
|
||||
|
||||
public final void nextTokenComma() {
|
||||
if (ch == ' ') {
|
||||
scanChar();
|
||||
}
|
||||
|
||||
if (ch == ',') {
|
||||
scanChar();
|
||||
token = COMMA;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch == ')') {
|
||||
scanChar();
|
||||
token = RPAREN;
|
||||
return;
|
||||
}
|
||||
|
||||
nextToken();
|
||||
}
|
||||
|
||||
public final void nextTokenLParen() {
|
||||
if (ch == ' ') {
|
||||
scanChar();
|
||||
}
|
||||
|
||||
if (ch == '(') {
|
||||
scanChar();
|
||||
token = LPAREN;
|
||||
return;
|
||||
}
|
||||
nextToken();
|
||||
}
|
||||
|
||||
public final void nextToken() {
|
||||
bufPos = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user