Package xbird.xquery.expr.types

Examples of xbird.xquery.expr.types.CaseClause


        List cases = expr.getCaseClauses();
        for(int i = 0; i < cases.size(); i++) {
            if(i != 0) {
                lineFeed();
            }
            CaseClause c = (CaseClause) cases.get(i);
            c.visit(this, ctxt);
        }
        lineFeed();
        buf.append("default:");
        XQExpression dc = expr.getDefaultClause();
        if(dc != null) {
View Full Code Here


                "default" ("$" VarName)? "return" ExprSingle
    ************************************************************************/
    final public TypeswitchExpr parseTypeswitchExpr() throws ParseException, XQueryException {
        final TypeswitchExpr switchExpr;
        XQExpression expr = null;
        CaseClause cc = null;
        QualifiedName varName = null;
        currentToken = jj_consume_token(TypeswitchLpar);
        expr = parseExpr();
        switchExpr = new TypeswitchExpr(expr);
        locate(switchExpr);
        currentToken = jj_consume_token(Rpar);
        label_14: while(true) {
            cc = parseCaseClause();
            switchExpr.addCaseClause(cc);
            switch(jj_nt.kind) {
                case Case:
                    ;
                    break;
                default:
                    jj_la1[87] = jj_gen;
                    break label_14;
            }
        }
        currentModule.pushVarScope();
        currentToken = jj_consume_token(Default);
        switch(jj_nt.kind) {
            case VariableIndicator:
                currentToken = jj_consume_token(VariableIndicator);
                currentToken = jj_consume_token(VarName);
                varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
                break;
            default:
                jj_la1[88] = jj_gen;
                ;
        }
        currentToken = jj_consume_token(Return);
        expr = parseExprSingle();
        CaseVariable var = new CaseVariable(varName);
        CaseClause dc = new CaseClause(var, expr);
        switchExpr.setDefaultClause(dc);
        currentModule.popVarScope();
        {
            if(true)
                return switchExpr;
View Full Code Here

        varType = parseSequenceType();
        caseVar.setType(varType);
        currentToken = jj_consume_token(Return);
        retExpr = parseExprSingle();
        currentModule.popVarScope();
        final CaseClause cc = new CaseClause(caseVar, retExpr);
        locate(cc);
        {
            if(true)
                return cc;
        }
View Full Code Here

     "default" ("$" VarName)? "return" ExprSingle
     ************************************************************************/
    final public TypeswitchExpr parseTypeswitchExpr() throws ParseException, XQueryException {
        final TypeswitchExpr switchExpr;
        XQExpression expr = null;
        CaseClause cc = null;
        QualifiedName varName = null;
        currentToken = jj_consume_token(TypeswitchLpar);
        expr = parseExpr();
        switchExpr = new TypeswitchExpr(expr);
        locate(switchExpr);
        currentToken = jj_consume_token(Rpar);
        label_12: while(true) {
            cc = parseCaseClause();
            switchExpr.addCaseClause(cc);
            switch(jj_nt.kind) {
                case Case:
                    ;
                    break;
                default:
                    jj_la1[82] = jj_gen;
                    break label_12;
            }
        }
        currentModule.pushVarScope();
        currentToken = jj_consume_token(Default);
        switch(jj_nt.kind) {
            case VariableIndicator:
                currentToken = jj_consume_token(VariableIndicator);
                currentToken = jj_consume_token(VarName);
                varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
                break;
            default:
                jj_la1[83] = jj_gen;
                ;
        }
        currentToken = jj_consume_token(Return);
        expr = parseExprSingle();
        CaseVariable var = new CaseVariable(varName);
        CaseClause dc = new CaseClause(var, expr);
        switchExpr.setDefaultClause(dc);
        currentModule.popVarScope();
        {
            if(true)
                return switchExpr;
View Full Code Here

        varType = parseSequenceType();
        caseVar.setType(varType);
        currentToken = jj_consume_token(Return);
        retExpr = parseExprSingle();
        currentModule.popVarScope();
        final CaseClause cc = new CaseClause(caseVar, retExpr);
        locate(cc);
        {
            if(true)
                return cc;
        }
View Full Code Here

TOP

Related Classes of xbird.xquery.expr.types.CaseClause

Copyright © 2018 www.massapicom. 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.