mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
enhance sql parser
This commit is contained in:
@@ -144,6 +144,10 @@ public class Lexer {
|
||||
protected final void scanChar() {
|
||||
ch = buf[++bp];
|
||||
}
|
||||
|
||||
protected void unscan() {
|
||||
ch = buf[--bp];
|
||||
}
|
||||
|
||||
/**
|
||||
* Report an error at the given position using the provided arguments.
|
||||
@@ -253,6 +257,11 @@ public class Lexer {
|
||||
return;
|
||||
case '.':
|
||||
scanChar();
|
||||
if (isDigit(ch)) {
|
||||
unscan();
|
||||
scanNumber();
|
||||
return;
|
||||
}
|
||||
token = Token.DOT;
|
||||
return;
|
||||
case '\'':
|
||||
|
||||
Reference in New Issue
Block a user