Search in sources :

Example 1 with UnaryPrefixExpr

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

the class SqlParser method parseUnaryPrefixExpr.

private UnaryPrefixExpr parseUnaryPrefixExpr(List<IToken> list, ParseContext ctx) {
    // UnaryPrefix Atom
    ParseStep lock = ctx.checkAndAdd("UnaryPrefixExpr", list);
    if (lock == null) {
        return null;
    }
    try {
        UnaryPrefix up = null;
        IToken a = null;
        if ((up = removeToken(list, UnaryPrefix.class)) != null && (a = parseAtom(list, ctx)) != null) {
        // ok
        } else {
            // restore incomplete
            if (up != null) {
                list.add(0, up);
            }
            return null;
        }
        UnaryPrefixExpr e = new UnaryPrefixExpr();
        e.addChild(up);
        e.addChild(a);
        return e;
    } finally {
        ctx.remove(lock);
    }
}
Also used : IToken(org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.IToken) UnaryPrefix(org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.UnaryPrefix) UnaryPrefixExpr(org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.UnaryPrefixExpr)

Aggregations

IToken (org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.IToken)1 UnaryPrefix (org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.UnaryPrefix)1 UnaryPrefixExpr (org.eclipse.scout.rt.server.jdbc.parsers.sql.SqlParserToken.UnaryPrefixExpr)1