docs: @Override protected void visitIfNode(IfNode node) {
  
      // Create another instance of this visitor class for generating JS expressions from children.
      GenJsExprsVisitor genJsExprsVisitor =
          genJsExprsVisitorFactory.create(translationContext, templateAliases, errorReporter);
      CodeChunk.Generator generator = translationContext.codeGenerator();
  
      List<Expression> ifs = new ArrayList<>();
      List<Expression> thens = new ArrayList<>();
      Expression trailingElse = null;
  
      for (SoyNode child : node.getChildren()) {
  
        if (child instanceof IfCondNode) {
          IfCondNode ifCond = (IfCondNode) child;
  
          ifs.add(translateExpr(ifCond.getExpr()));
          thens.add(CodeChunkUtils.concatChunks(genJsExprsVisitor.exec(ifCond)));
        } else if (child instanceof IfElseNode) {
          trailingElse = CodeChunkUtils.concatChunks(genJsExprsVisitor.exec(child));
        } else {
          throw new AssertionError();
        }
      }
  
      Preconditions.checkState(ifs.size() == thens.size());
  
      ConditionalExpressionBuilder builder = Expression.ifExpression(ifs.get(0), thens.get(0));
  
      for (int i = 1; i < ifs.size(); i++) {
        builder.addElseIf(ifs.get(i), thens.get(i));
      }
  
      Expression ifChunk =
          trailingElse != null
              ? builder.setElse(trailingElse).build(generator)
              : builder.setElse(LITERAL_EMPTY_STRING).build(generator);
  
      chunks.add(ifChunk);
    }