mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
代码重构
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@280 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -654,10 +654,16 @@ public class SQLExprParser extends SQLParser {
|
||||
}
|
||||
|
||||
public final SQLExpr bitOrRest(SQLExpr expr) throws ParserException {
|
||||
while (lexer.token() == Token.BAR) {
|
||||
if (lexer.token() == Token.BAR) {
|
||||
lexer.nextToken();
|
||||
SQLExpr rightExp = bitAnd();
|
||||
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.BitwiseOr, rightExp);
|
||||
expr = bitAndRest(expr);
|
||||
} else if (lexer.token() == Token.TILDE) {
|
||||
lexer.nextToken();
|
||||
SQLExpr rightExp = bitAnd();
|
||||
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.InvertBits, rightExp);
|
||||
expr = bitAndRest(expr);
|
||||
}
|
||||
return expr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user