Search in sources :

Example 1 with FunExpr

use of org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.FunExpr in project scout.rt by eclipse.

the class SqlParser method parseFunExpr.

private FunExpr parseFunExpr(List<IToken> list, ParseContext ctx) {
    // Name BracketExpr
    ParseStep lock = ctx.checkAndAdd("FunExpr", list);
    if (lock == null) {
        return null;
    }
    try {
        Name nm = null;
        BracketExpr be = null;
        if ((nm = removeToken(list, Name.class)) != null && (be = parseBracketExpr(list, ctx)) != null) {
        // ok
        } else {
            // restore incomplete
            if (nm != null) {
                list.add(0, nm);
            }
            return null;
        }
        FunExpr e = new FunExpr();
        e.addChild(nm);
        e.addChild(be);
        return e;
    } finally {
        ctx.remove(lock);
    }
}
Also used : BracketExpr(org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.BracketExpr) FunExpr(org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.FunExpr) Name(org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.Name)

Aggregations

BracketExpr (org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.BracketExpr)1 FunExpr (org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.FunExpr)1 Name (org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.Name)1