Process each node beginning with the current node.
190685
def each(value = nil, &block)
      yield self, value
      if @children
        @children.each do |child|
          child.each value, &block
        end
      end
      value
    end
602714
static function processNodeCombining( $useComments, $php, $tpl, &$node, &$resourceData, &$newNode )
    {
        $nodeType = $node[0];
        if ( $nodeType == eZTemplate::NODE_ROOT )
        {
            $children = $node[1];
            $newNode[0] = $nodeType;
            $newNode[1] = false;
            if ( $children )
            {
                eZTemplateCompiler::processNodeCombiningChildren( $useComments, $php, $tpl, $children, $resourceData, $newNode );
            }
        }
        else
            $tpl->error( 'processNodeCombining', "Unknown root type $nodeType, should be " . eZTemplate::NODE_ROOT );
    }
77730
def _nodes(output, parent=None):
    """"""
    # NOTE refactor so all outputs behave the same
    entity = getattr(output, 'entity', output)

    if isinstance(entity, Collection):
        for member in entity.members:
            if parent is not None:
                member = attr.evolve(member, parent=parent)
            yield from _nodes(member)
        yield output
    else:
        yield output
484078
private void processPredecessors() throws SQLException
   {
      List<Row> rows = getRows("select * from link where projid=? order by linkid", m_projectID);
      List<Row> completedSections = getRows("select * from task_completed_section where projid=?", m_projectID);
      m_reader.processPredecessors(rows, completedSections);
   }
884581
private void processNode(Node node) throws IOException {
		for (Node cursor = node.getFirstChild(); cursor != null; cursor = cursor.getNext()) {
			int lineno = cursor.getLineno()-1;	// adjust for rhino line numbers being 1 based
			int charno = cursor.getCharno();
			if (lineno > currentLine || lineno == currentLine && charno > currentChar) {
				currentLine = lineno;
				currentChar = charno;
			}
			FilePosition endPosition = getEndPosition(cursor);
			sgen.addMapping(name, null,
					new FilePosition(currentLine, currentChar),
					new FilePosition(currentLine, currentChar),
					endPosition);
			if (cursor.hasChildren()) {
				processNode(cursor);
			}
		}
	}
1239018
static function processNodeTransformationChildren( $useComments, $php, $tpl, &$node, &$children, &$resourceData )
    {
        if ( $children )
        {
            $newChildren = array();
            foreach ( $children as $childNode )
            {
                $newChildNode = eZTemplateCompiler::processNodeTransformationChild( $useComments, $php, $tpl, $childNode, $resourceData );
                if ( !$newChildNode )
                    $newChildren[] = $childNode;
                else
                    $newChildren = array_merge( $newChildren, $newChildNode );
            }
            if ( count( $newChildren ) > 0 )
                return $newChildren;
        }
        return $children;
    }
191437
protected void processNode(Node current)
	{
		// Do not process the node if it is ubique

		if (current.isUbique())
		{
			setColor(current, BLACK);
			return;
		}

//		System.out.println("processing = " + current);

		// Process edges towards the direction

		for (Edge edge : direction == Direction.DOWNSTREAM ?
			current.getDownstream() : current.getUpstream())
		{
			assert edge != null;

			// Label the edge considering direction of traversal and type of current node

			if (direction == Direction.DOWNSTREAM || !current.isBreadthNode())
			{
				setLabel(edge, getLabel(current));
			}
			else
			{
				setLabel(edge, getLabel(current) + 1);
			}

			// Get the other end of the edge
			Node neigh = direction == Direction.DOWNSTREAM ?
				edge.getTargetNode() : edge.getSourceNode();

			assert neigh != null;

			// Decide neighbor label according to the search direction and node type
			int dist = getLabel(edge);
			if (neigh.isBreadthNode() && direction == Direction.DOWNSTREAM) dist++;

			// Check if we need to stop traversing the neighbor, enqueue otherwise
			boolean further = (stopSet == null || !isEquivalentInTheSet(neigh, stopSet)) &&
				(!neigh.isBreadthNode() || dist < limit) && !neigh.isUbique();

			// Process the neighbor if not processed or not in queue

			if (getColor(neigh) == WHITE)
			{
				// Label the neighbor
				setLabel(neigh, dist);

				if (further)
				{
					setColor(neigh, GRAY);

					// Enqueue the node according to its type

					if (neigh.isBreadthNode())
					{
						queue.addLast(neigh);
					}
					else
					{
						// Non-breadth nodes are added in front of the queue
						queue.addFirst(neigh);
					}
				}
				else
				{
					// If we do not want to traverse this neighbor, we paint it black
					setColor(neigh, BLACK);
				}
			}


			labelEquivRecursive(neigh, UPWARD, getLabel(neigh), further, !neigh.isBreadthNode());
			labelEquivRecursive(neigh, DOWNWARD, getLabel(neigh), further, !neigh.isBreadthNode());
		}
	}
860359
def process
      current_node = @instance.current_node
      return unless current_node
      child_node = current_node.send @child_node_name
      @instance.process_with_other_node child_node do
        @instance.instance_eval &@block
      end
    end
536850
def process_node(node, level=1)
      entries = node.children
      @visitor.enter_node(node)
      entries.each do |entry|
        unless is_leaf?(entry)
          process_node(entry, level+1)
        else
          @visitor.visit_leaf(entry)
        end
      end
      @visitor.exit_node(node)
    end
77516
def prepare(self, start=-1):
        
        if start == -1:
            start = self.grammar.start
        self.root = None
        current_node = Node(start, None, [], 0, 0)
        self.stack = []
        self.stack.append((self.grammar.dfas[start - 256], 0, current_node))
1363551
def processChildElements( element, leafElementsOnly, block )
      if element
         if element.is_a?( Array )
            element.each{ |e| processChildElements( e, leafElementsOnly, block ) }
         elsif element.is_a?( REXML::Element ) and element.has_elements?
            block.call( element ) if not leafElementsOnly
            element.each{ |e|
               if e.is_a?( REXML::Element ) and e.has_elements?
                 processChildElements( e, leafElementsOnly, block )
               else
                 block.call( e )
               end
            }
         end
      end
    end
691315
def _bfs(root_node, process_node):
    

    from collections import deque

    seen_nodes = set()
    next_nodes = deque()

    seen_nodes.add(root_node)
    next_nodes.append(root_node)

    while next_nodes:
        current_node = next_nodes.popleft()

        # process current node
        process_node(current_node)

        for child_node in current_node.children:
            if child_node not in seen_nodes:
                seen_nodes.add(child_node)
                next_nodes.append(child_node)
83240
protected function _processTree($nodes)
    {
        foreach ($nodes as $node) {
            if ($node->hasMethods && $node->type !== 'interface') {
                $this->_processMethods($node->tree);
            } elseif (count($node->tree)) {
                $this->_processTree($node->tree);
            }
        }
    }
1096679
protected function processCurrentTable()
	{
		$firstRow = $this->table['rows'][0];
		$lastRow  = end($this->table['rows']);
		$this->createTableTags($firstRow['pos'], $lastRow['pos'] + strlen($lastRow['line']));

		$this->addTableHead();
		$this->createSeparatorTag($this->table['rows'][1]);
		$this->addTableBody();
	}
1076139
protected function processLogicalAndNode()
    {
        if (null !== $this->scope->getCurrentLeftNode()
            && null !== $this->scope->getNode()
            && null !== $this->scope->getCurrentOperator()
        ) {
            $node = new BooleanNode($this->scope->getCurrentLeftNode(), $this->scope->getNode(), $this->scope->getCurrentOperator());
            $this->scope
                ->setNode($node)
                ->deleteCurrentLeftNode()
                ->deleteCurrentOperator();
        }

        return $this;
    }
537093
private function start()
    {
        $annotation = (object) array(
            'name' => $this->tokens->getValue($this->tokens->key() + 1),
            'values' => new ArrayObject(),
        );

        // skip the name token
        $this->tokens->next();

        $offset = $this->tokens->key();

        // nest, if necessary
        if ($this->current) {
            if (null === ($key = $this->tokens->getKey($offset - 1))) {
                $this->current[] = $annotation;
            } else {
                $this->current[$key] = $annotation;
            }

            $this->stack[] = $this->current;

            // add to root
        } else {
            $this->result[] = $annotation;
        }

        if (DocLexer::T_OPEN_PARENTHESIS
            === $this->tokens->getId($offset + 1)) {
            $this->current = $annotation->values;
        }
    }
90172
static private void processHeredocStrings(SimpleNode node,
            List<StringProperty> strings) {

        // If there are any children, then process them in post-traversal order.
        int count = node.jjtGetNumChildren();
        if (count > 0) {
            for (int i = 0; i < count; i++) {
                SimpleNode n = (SimpleNode) node.jjtGetChild(i);

                // If this is a heredoc literal, then actually update the node
                // with the string.
                if (n instanceof ASTOperation) {
                    ASTOperation astop = (ASTOperation) n;
                    if (astop.getOperationType() == OperationType.HEREDOC) {

                        Operation op = astop.getOperation();
                        if (op instanceof LongProperty) {
                            LongProperty lprop = (LongProperty) op;
                            int index = lprop.getValue().intValue();
                            StringProperty sprop = strings.get(index);
                            astop.setOperationType(OperationType.LITERAL);
                            astop.setOperation(sprop);
                        } else {
                            throw new RuntimeException(
                                    "HEREDOC operation doesn't contain LongProperty");
                        }
                    }
                }

                // Alway process any children.
                processHeredocStrings(n, strings);
            }
        }
    }