代码重构

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@280 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-23 01:48:21 +00:00
parent 9e245f4773
commit 413be781fb
92 changed files with 143 additions and 105 deletions
@@ -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;
}