code: protected void visitChildrenAllowingConcurrentModification(ParentNode<? extends N> node) {
      // use toArray to create a copy to avoid concurrent modification exception
      for (Node child : node.getChildren().toArray(EMPTY_NODE_ARRAY)) {
        // safe since the parent only contains subtypes of N.
        @SuppressWarnings("unchecked")
        N typedChild = (N) child;
        visit(typedChild);
      }
    }
docs: Helper to visit all the children of a node, in order.
  
  <p>This method differs from {@code visitChildren} in that we are iterating through a copy of
  the children. Thus, concurrent modification of the list of children is allowed.
  
  @param node The parent node whose children to visit.
  @see #visitChildren