mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add odps sql parser support
This commit is contained in:
@@ -667,7 +667,6 @@ public class Lexer {
|
||||
bufPos = 1;
|
||||
char ch;
|
||||
|
||||
boolean mybatisFlag = false;
|
||||
if (charAt(pos + 1) == '@') {
|
||||
ch = charAt(++pos);
|
||||
|
||||
@@ -675,7 +674,29 @@ public class Lexer {
|
||||
} else if (charAt(pos + 1) == '{') {
|
||||
pos++;
|
||||
bufPos++;
|
||||
mybatisFlag = true;
|
||||
|
||||
for (;;) {
|
||||
ch = charAt(++pos);
|
||||
|
||||
if (ch == '}') {
|
||||
break;
|
||||
}
|
||||
|
||||
bufPos++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch != '}') {
|
||||
throw new ParserException("syntax error");
|
||||
}
|
||||
++pos;
|
||||
bufPos++;
|
||||
|
||||
this.ch = charAt(pos);
|
||||
|
||||
stringVal = addSymbol();
|
||||
token = Token.VARIANT;
|
||||
return;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@@ -689,14 +710,6 @@ public class Lexer {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mybatisFlag) {
|
||||
if (ch != '}') {
|
||||
throw new ParserException("syntax error");
|
||||
}
|
||||
++pos;
|
||||
bufPos++;
|
||||
}
|
||||
|
||||
this.ch = charAt(pos);
|
||||
|
||||
stringVal = addSymbol();
|
||||
|
||||
Reference in New Issue
Block a user