Package xbird.xquery.expr

Examples of xbird.xquery.expr.XQExpression.visit()


    }

    public XQExpression visit(SequenceOp op, XQueryContext ctxt) throws XQueryException {
        boolean isLoopInvariant = true;
        XQExpression left = op.getLeftOperand();
        left.visit(this, ctxt);
        isLoopInvariant &= left.isLoopInvariant();
        XQExpression right = op.getRightOperand();
        right.visit(this, ctxt);
        isLoopInvariant &= right.isLoopInvariant();
        if(isLoopInvariant) {
View Full Code Here


        boolean isLoopInvariant = true;
        XQExpression left = op.getLeftOperand();
        left.visit(this, ctxt);
        isLoopInvariant &= left.isLoopInvariant();
        XQExpression right = op.getRightOperand();
        right.visit(this, ctxt);
        isLoopInvariant &= right.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(left);
            removeInvariants(right);
            return hookLoopInvariant(op);
View Full Code Here

    }

    public XQExpression visit(TextConstructor constructor, XQueryContext ctxt)
            throws XQueryException {
        XQExpression content = constructor.getContent();
        content.visit(this, ctxt);
        boolean isLoopInvariant = content.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(content);
            return hookLoopInvariant(constructor);
        }
View Full Code Here

        return constructor;
    }

    public XQExpression visit(TreatExpr expr, XQueryContext ctxt) throws XQueryException {
        XQExpression e = expr.getExpression();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(expr);
        }
View Full Code Here

        return expr;
    }

    public XQExpression visit(TypePromotedExpr expr, XQueryContext ctxt) throws XQueryException {
        XQExpression e = expr.getPromotedExpr();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(expr);
        }
View Full Code Here

    }

    public XQExpression visit(TypeswitchExpr expr, XQueryContext ctxt) throws XQueryException {
        boolean isLoopInvariant = true;
        XQExpression opr = expr.getOperandExpr();
        opr.visit(this, ctxt);
        isLoopInvariant &= opr.isLoopInvariant();
        for(XQExpression c : expr.getCaseClauses()) {
            c.visit(this, ctxt);
            isLoopInvariant &= c.isLoopInvariant();
        }
View Full Code Here

            c.visit(this, ctxt);
            isLoopInvariant &= c.isLoopInvariant();
        }
        XQExpression def = expr.getDefaultClause();
        if(def != null) {
            def.visit(this, ctxt);
            isLoopInvariant &= def.isLoopInvariant();
        }
        if(isLoopInvariant) {
            removeInvariants(opr);
            for(XQExpression c : expr.getCaseClauses()) {
View Full Code Here

        return op;
    }

    public XQExpression visit(UnorderedExpr expr, XQueryContext ctxt) throws XQueryException {
        XQExpression e = expr.getExpr();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(expr);
        }
View Full Code Here

        return expr;
    }

    public XQExpression visit(UserFunction function, XQueryContext ctxt) throws XQueryException {
        XQExpression body = function.getBodyExpression();
        body.visit(this, ctxt);
        boolean isLoopInvariant = body.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(body); // TODO REVIEWME
        }
        return null;
View Full Code Here

        return null;
    }

    public XQExpression visit(ValidateOp op, XQueryContext ctxt) throws XQueryException {
        XQExpression e = op.getExpression();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(op);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.