use of org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.CloseBracketToken in project scout.rt by eclipse.
the class SqlFormatter method formatBracketExpr.
private void formatBracketExpr(BracketExpr stm, FormatContext ctx) {
boolean multiline = isMultiline(stm);
for (IToken t : stm.getChildren()) {
if (t instanceof OpenBracketToken) {
formatDefault(t, ctx);
if (multiline) {
ctx.println();
ctx.in();
}
} else if (t instanceof CloseBracketToken) {
if (multiline) {
ctx.out();
}
formatDefault(t, ctx);
} else if (t instanceof Statement) {
formatStatement((Statement) t, ctx);
} else if (t instanceof SingleStatement) {
formatSingleStatement((SingleStatement) t, ctx);
} else if (t instanceof ListExpr) {
formatListExpr((ListExpr) t, multiline, ctx);
} else {
formatDefault(t, ctx);
}
}
}
Aggregations