mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sql wall
This commit is contained in:
@@ -384,8 +384,15 @@ public class MySqlLexer extends Lexer {
|
||||
|
||||
public void scanComment() {
|
||||
Token lastToken = this.token;
|
||||
|
||||
if (ch != '/' && ch != '-') {
|
||||
|
||||
if (ch == '-') {
|
||||
char next_2 = charAt(pos + 2);
|
||||
if (isDigit(next_2)) {
|
||||
scanChar();
|
||||
token = Token.SUB;
|
||||
return;
|
||||
}
|
||||
} else if (ch != '/') {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public class Lexer {
|
||||
protected final void scanChar() {
|
||||
ch = charAt(++pos);
|
||||
}
|
||||
|
||||
|
||||
protected void unscan() {
|
||||
ch = charAt(--pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user