Recursively iterate all child nodes of current node.

 @yield [child] Gives a child node.
 @yieldparam child [Parser::AST::Node] child node
13373
def recursive_children
      self.children.each do |child|
        if Parser::AST::Node === child
          yield child
          child.recursive_children { |c| yield c }
        end
      end
    end
511770
def iterate(node)
      return unless node.is_a?(AST::Node)

      before    = :"on_#{node.type}"
      after     = :"after_#{node.type}"
      skip_node = catch :skip_child_nodes do
        execute_callback(before, node)
      end

      if skip_node != node
        node.children.each do |child|
          iterate(child) if child.is_a?(AST::Node)
        end
      end

      execute_callback(after, node)
    end
174844
def generate_child_leaf_nodes(self):
        

        def _yield_child_leaf_nodes(node):
            """

            Args:
                node:

            Yields:
            """
            if not node.has_children():
                yield node
            else:
                for child_node in node.generate_child_nodes():
                    # recursivity is not compatible with yield in Python2.x: you have to re-yield results
                    for child in _yield_child_leaf_nodes(child_node):
                        yield child

        return _yield_child_leaf_nodes(self)
988108
def walk(node):
    
    from collections import deque
    todo = deque([node])
    while todo:
        node = todo.popleft()
        todo.extend(iter_child_nodes(node))
        yield node
832636
def expand_children node=:current_index
      $multiplier = 999 if !$multiplier || $multiplier == 0
      node = row_to_node if node == :current_index
      return if node.children.empty? # or node.is_leaf?
      #node.children.each do |e| 
        #expand_node e # this will keep expanding parents
        #expand_children e
      #end
      node.breadth_each($multiplier) do |e|
        expand_node e
      end
      $multiplier = 0
      _structure_changed true
    end
1036495
public static void iterateChildren (@Nonnull final IHCNode aNode, @Nonnull final IHCIteratorCallback aCallback)
  {
    ValueEnforcer.notNull (aNode, "node");
    ValueEnforcer.notNull (aCallback, "callback");

    _recursiveIterateTreeBreakable (aNode, aCallback);
  }
1126159
def process
      current_node = @instance.current_node
      return unless current_node
      @instance.process_with_node current_node do
        matching_nodes = []
        matching_nodes << current_node if current_node.match? @rules
        current_node.recursive_children do |child_node|
          matching_nodes << child_node if child_node.match? @rules
        end
        matching_nodes.each do |matching_node|
          @instance.process_with_node matching_node do
            @instance.instance_eval &@block
          end
        end
      end
    end
1333346
def each_recursive(&block) # :yields: node
      self.elements.each {|node|
        block.call(node)
        node.each_recursive(&block)
      }
    end
964220
def iter_equivalent_nodes(self, node: BaseEntity) -> Iterable[BaseEntity]:
        """"""
        yield node
        yield from self._equivalent_node_iterator_helper(node, {node})
531559
def get_children(self):
        
        for expr, var in self.items:
            yield expr
            if var:
                yield var
        yield from self.body
317186
def node_children(node)
      children = @navigator.call(node)
      return Array::EMPTY_ARRAY if children.nil?
      Enumerable === children ? children.to_a.compact : [children]
    end
491269
def get_all_children(self):
        
        children = self._children[:]
        oldlen = 0
        newlen = len(children)
        while oldlen != newlen:
            start = oldlen
            oldlen = len(children)
            for i in range(start, len(children)):
                children.extend(children[i]._children)
            newlen = len(children)
        return children
1202068
def each
      root.each do |node, mode, stack|
        if mode == :on_enter
          yield(node.blob_address, node.size)
        end
      end
    end
1021221
def iterate_elements(parent):
        
        element = parent.firstChild
        while element is not None:
            yield element
            element = element.nextSibling
125977
def each_element(path, elements)
      elements = Array(elements)
      Nokogiri::XML::Reader(::File.open(path, 'rb'), nil, nil, Nokogiri::XML::ParseOptions::NOBLANKS).each do |node|
        next unless node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT && elements.include?(node.name)
        yield Nokogiri::XML(node.outer_xml).root if block_given?
      end
    end
519819
def descendants
      nodes = []
      children.each do |c|
        nodes << c
        nodes << c.descendants
      end
      nodes.flatten
    end
1107937
def node(o)
      @nodes.fetch(o.object_id) do
        new_node = @g.add_nodes new_node_name, node_options(o)
        @nodes[o.object_id] = new_node
        each_child_node_of(o) {|_| new_node << node(_) }
        new_node
      end
    end