use of org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.OrOp in project scout.rt by eclipse.
the class SqlParser method parseOrExpr.
private OrExpr parseOrExpr(List<IToken> list, ParseContext ctx) {
// AndExpr (BinaryOp['OR'] AndExpr)*
ParseStep lock = ctx.checkAndAdd("OrExpr", list);
if (lock == null) {
return null;
}
try {
AndExpr ae = parseAndExpr(list, ctx);
if (ae == null) {
return null;
}
OrExpr oe = new OrExpr();
oe.addChild(ae);
OrOp oo;
while ((oo = removeToken(list, OrOp.class)) != null && (ae = parseAndExpr(list, ctx)) != null) {
oe.addChild(oo);
oe.addChild(ae);
}
// remaining?
if (oo != null) {
oo.addComment(new Comment("/*syntax warning*/"));
oe.addChild(oo);
}
return oe;
} finally {
ctx.remove(lock);
}
}
Aggregations