use of org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.ListSeparator in project scout.rt by eclipse.
the class SqlParser method parseListExpr.
private ListExpr parseListExpr(List<IToken> list, ParseContext ctx) {
// OrExpr (ListSeparator OrExpr)*
ParseStep lock = ctx.checkAndAdd("ListExpr", list);
if (lock == null) {
return null;
}
try {
OrExpr oe = parseOrExpr(list, ctx);
if (oe == null) {
return null;
}
ListExpr le = new ListExpr();
le.addChild(oe);
ListSeparator ls = null;
while ((ls = removeToken(list, ListSeparator.class)) != null && (oe = parseOrExpr(list, ctx)) != null) {
le.addChild(ls);
le.addChild(oe);
}
// restore incomplete
if (ls != null) {
list.add(0, ls);
}
return le;
} finally {
ctx.remove(lock);
}
}
Aggregations