Visits the children of a ParentSoyNode. This function is overridden to not do all of the work
that {@link GenJsCodeVisitor} does.
555367
@Override
  protected void visitChildren(ParentSoyNode<?> node) {
    for (SoyNode child : node.getChildren()) {
      visit(child);
    }
  }
764408
@Override
  protected void visitIfNode(IfNode node) {
    // Create another instance of this visitor for generating Python expressions from children.
    GenPyExprsVisitor genPyExprsVisitor =
        genPyExprsVisitorFactory.create(localVarExprs, errorReporter);
    TranslateToPyExprVisitor translator =
        new TranslateToPyExprVisitor(localVarExprs, pluginValueFactory, errorReporter);

    StringBuilder pyExprTextSb = new StringBuilder();

    boolean hasElse = false;
    // We need to be careful about parenthesizing the sub-expressions in a python ternary operator,
    // as nested ternary operators will right-associate. Due to the structure of the parse tree,
    // we accumulate open parens in the loop below, and pendingParens tracks how many closing parens
    // we need to add at the end.
    int pendingParens = 0;
    for (SoyNode child : node.getChildren()) {

      if (child instanceof IfCondNode) {
        IfCondNode icn = (IfCondNode) child;

        // Python ternary conditional expressions modify the order of the conditional from
        // <conditional> ? <true> : <false> to
        // <true> if <conditional> else <false>
        PyExpr condBlock = PyExprUtils.concatPyExprs(genPyExprsVisitor.exec(icn)).toPyString();
        condBlock =
            PyExprUtils.maybeProtect(
                condBlock, PyExprUtils.pyPrecedenceForOperator(Operator.CONDITIONAL));
        pyExprTextSb.append("(").append(condBlock.getText());

        // Append the conditional and if/else syntax.
        PyExpr condPyExpr = translator.exec(icn.getExpr());
        pyExprTextSb.append(") if (").append(condPyExpr.getText()).append(") else (");
        pendingParens++;

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

        PyExpr elseBlock = PyExprUtils.concatPyExprs(genPyExprsVisitor.exec(ien)).toPyString();
        pyExprTextSb.append(elseBlock.getText()).append(")");
        pendingParens--;
      } else {
        throw new AssertionError("Unexpected if child node type. Child: " + child);
      }
    }

    if (!hasElse) {
      pyExprTextSb.append("''");
    }
    for (int i = 0; i < pendingParens; i++) {
      pyExprTextSb.append(")");
    }

    // By their nature, inline'd conditionals can only contain output strings, so they can be
    // treated as a string type with a conditional precedence.
    pyExprs.add(
        new PyStringExpr(
            pyExprTextSb.toString(), PyExprUtils.pyPrecedenceForOperator(Operator.CONDITIONAL)));
  }
65507
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            initializer.visit(v);
            condition.visit(v);
            increment.visit(v);
            body.visit(v);
        }
    }
577423
private void visitChildren(Node parent, Collection<Class<? extends Node>> includeNodes) {
    Node child = parent.getFirstChild();
    while (child != null) {
      // A subclass of this visitor might modify the node, resulting in getNext returning a different node or no
      // node after visiting it. So get the next node before visiting.
      Node next = child.getNext();
      if (includeNodes.contains(child.getClass())) {
        child.accept(this);
      } else {
        visitChildren(child, includeNodes);
      }
      child = next;
    }
  }
1161908
@Override
    public final void visitParent(Element element) {
        if (isWriting()){
            depth--;
            newlineAndIndent();
            endTag(element.getName()); // </elementName>
        }
    }
272240
function readScopes (root, kids, cb) {
  var scopes = kids . filter (function (kid) {
    return kid . charAt (0) === '@'
  })

  kids = kids . filter (function (kid) {
    return kid . charAt (0) !== '@'
  })

  debug ('scopes=%j', scopes)

  if (scopes . length === 0)
    dz (cb) (null, kids) // prevent maybe-sync zalgo release

  cb = once (cb)
  var l = scopes . length
  scopes . forEach (function (scope) {
    var scopedir = path . resolve (root, scope)
    debug ('root=%j scope=%j scopedir=%j', root, scope, scopedir)
    fs . readdir (scopedir, then . bind (null, scope))
  })

  function then (scope, er, scopekids) {
    if (er)
      return cb (er)

    // XXX: Not sure how old this node bug is. Maybe superstition?
    scopekids = scopekids . filter (function (scopekid) {
      return !(scopekid === '.' || scopekid === '..' || !scopekid)
    })

    kids . push . apply (kids, scopekids . map (function (scopekid) {
      return scope + '/' + scopekid
    }))

    debug ('scope=%j scopekids=%j kids=%j', scope, scopekids, kids)

    if (--l === 0)
      cb (null, kids)
  }
}
425893
@Override
    public void visit(NodeVisitor v) {
        if (!v.visit(this)) {
            return;
        }
        result.visit(v);
        for (ArrayComprehensionLoop loop : loops) {
            loop.visit(v);
        }
        if (filter != null) {
            filter.visit(v);
        }
    }
197940
private void checkForDuplicateAttributes(ParentSoyNode<StandaloneNode> parentNode) {
    DuplicateAttributesVisitor visitor = new DuplicateAttributesVisitor();
    List<StandaloneNode> children = parentNode.getChildren();
    if (parentNode instanceof HtmlTagNode) {
      // the first child is the tag name, which isn't interesting, so skip it
      children = children.subList(1, children.size());
    }
    for (SoyNode child : children) {
      visitor.exec(child);
    }
  }
1310987
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            for (XmlFragment frag : fragments) {
                frag.visit(v);
            }
        }
    }
700472
@Override
  protected void visitIfNode(IfNode node) {

    if (isComputableAsJsExprsVisitor.exec(node)) {
      jsCodeBuilder.addChunksToOutputVar(genJsExprsVisitor.exec(node));
    } else {
      generateNonExpressionIfNode(node);
    }
  }
263528
def _visit_for(self, cls, node, parent):
        """"""
        newnode = cls(node.lineno, node.col_offset, parent)
        type_annotation = self.check_type_comment(node)
        newnode.postinit(
            target=self.visit(node.target, newnode),
            iter=self.visit(node.iter, newnode),
            body=[self.visit(child, newnode) for child in node.body],
            orelse=[self.visit(child, newnode) for child in node.orelse],
            type_annotation=type_annotation,
        )
        return newnode
1364429
@Override
  public void visit(NodeTraversal t, Node n, Node parent) {
    if (topLevelStatementDraft != null) {
      if (n.equals(topLevelStatementDraft.statementNode)) {
        topLevelStatements.add(new TopLevelStatement(topLevelStatementDraft));
        topLevelStatementDraft = null;
      } else if (n.isName()) {
        String varName = n.getString();
        Var v = t.getScope().getVar(varName);

        if (v != null) {
          // Only global, non-exported names can be moved
          if (v.isGlobal() && !compiler.getCodingConvention().isExported(v.getName())) {
            if (varsByName.containsKey(varName)) {
              checkState(Objects.equals(varsByName.get(varName), v));
            } else {
              varsByName.put(varName, v);
            }
            Reference reference = new Reference(n, t, peek(blockStack));
            if (reference.getNode() == topLevelStatementDraft.declaredNameNode) {
              topLevelStatementDraft.declaredNameReference = reference;
            } else {
              topLevelStatementDraft.nonDeclarationReferences.add(reference);
            }
            addReferenceToCollection(v, reference);
          }
        }
      }
    }
    if (isBlockBoundary(n, parent)) {
      pop(blockStack);
    }
  }
1297338
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            if (functionName != null) {
                functionName.visit(v);
            }
            for (AstNode param : getParams()) {
                param.visit(v);
            }
            getBody().visit(v);
            if (!isExpressionClosure) {
                if (memberExprNode != null) {
                    memberExprNode.visit(v);
                }
            }
        }
    }
674961
protected void visitChildNodes(NodeData node) throws RepositoryException
   {
      if (isInterrupted())
         return;
      for (NodeData data : dataManager.getChildNodesData(node))
      {
         if (isInterrupted())
            return;
         data.accept(this);
      }
   }
199675
public static void visitTree(Simon simon, SimonVisitor visitor) throws IOException {
		visitor.visit(simon);
		for (Simon childSimon : simon.getChildren()) {
			visitTree(childSimon, visitor);
		}
	}
604635
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            if (expression != null) {
                expression.visit(v);
            }
            if (statements != null) {
                for (AstNode s : statements) {
                    s.visit(v);
                }
            }
        }
    }
1003450
function (child, parent, visited) {
  // Check for circular reference.
  if (visited == null) visited = new Set()
  if (visited.has(parent)) return

  visited.add(parent)
  for (const key in parent) {
    if (key === 'isBrowserView') continue
    if (!hasProp.call(parent, key)) continue
    if (key in child && key !== 'webPreferences') continue

    const value = parent[key]
    if (typeof value === 'object') {
      child[key] = mergeOptions(child[key] || {}, value, visited)
    } else {
      child[key] = value
    }
  }
  visited.delete(parent)

  return child
}