Package com.google.template.soy.soytree

Examples of com.google.template.soy.soytree.IfElseNode


        javaCodeBuilder.increaseIndent();
        visit(icn);
        javaCodeBuilder.decreaseIndent();

      } else if (child instanceof IfElseNode) {
        IfElseNode ien = (IfElseNode) child;

        javaCodeBuilder.appendLine("} else {");

        javaCodeBuilder.increaseIndent();
        visit(ien);
View Full Code Here


        javaExprTextSb.append(" : ");

      } else if (child instanceof IfElseNode) {
        hasElse = true;
        IfElseNode ien = (IfElseNode) child;

        List<JavaExpr> elseBlockJavaExprs = genJavaExprsVisitor.exec(ien);
        javaExprTextSb.append(
            genMaybeProtect(JavaExprUtils.concatJavaExprs(elseBlockJavaExprs),
                            Operator.CONDITIONAL.getPrecedence() + 1));
View Full Code Here

          int condIndex = node.getChildIndex(condNode);
          for (int i = node.numChildren() - 1; i > condIndex; i--) {
            node.removeChild(i);
          }
          // Replace this child with a new IfElseNode.
          IfElseNode newElseNode = new IfElseNode(nodeIdGen.genId());
          newElseNode.addChildren(condNode.getChildren());
          node.replaceChild(condIndex, newElseNode);
          // Stop processing.
          break;

        } else {
View Full Code Here

        jsExprTextSb.append(" : ");

      } else if (child instanceof IfElseNode) {
        hasElse = true;
        IfElseNode ien = (IfElseNode) child;

        List<JsExpr> elseBlockJsExprs = genJsExprsVisitor.exec(ien);
        jsExprTextSb.append(JsExprUtils.concatJsExprs(elseBlockJsExprs).getText());

      } else {
View Full Code Here

        jsCodeBuilder.increaseIndent();
        visit(icn);
        jsCodeBuilder.decreaseIndent();

      } else if (child instanceof IfElseNode) {
        IfElseNode ien = (IfElseNode) child;

        jsCodeBuilder.appendLine("} else {");

        jsCodeBuilder.increaseIndent();
        visit(ien);
View Full Code Here

TOP

Related Classes of com.google.template.soy.soytree.IfElseNode

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.