Parse a node to update the parent node model.

@param mixed         $node   The node to parse.
@param NodeInterface $parent The parent node.

This method do nothing because parsing expr is hard and useless for PhpUnitGen.
779287
public function invoke($node, NodeInterface $parent): void
    {
        if (! $node instanceof Node\Expr || ! $parent instanceof VariableLikeInterface) {
            throw new Exception('ValueNodeParser is made to parse a expression node');
        }
    }
841462
public function add_children(& $node, $parentidnumber) {
        foreach ($this->flat as $competency) {
            if ($competency->parentidnumber == $parentidnumber) {
                $this->progress->increment_progress();
                $node->children[] = $competency;
                $this->add_children($competency, $competency->idnumber);
            }
        }
    }
683249
protected function _processTree($parent)
    {
        foreach ($parent->tree as $node) {
            if ($node->hasMethods && $node->type !== 'interface') {
                $this->_processMethods($node);
            } elseif (!empty($node->tree)) {
                $this->_processTree($node);
            }
        }
    }
538737
public function invoke($node, NodeInterface $parent): void
    {
        if ($this->config->hasInterfaceParsing()) {
            if (! $node instanceof Node\Stmt\Interface_ || ! $parent instanceof PhpFileModelInterface) {
                throw new Exception('InterfaceNodeParser is made to parse an interface node');
            }

            $interface = new InterfaceModel();
            $interface->setParentNode($parent);
            $interface->setName(ClassLikeNameHelper::getName($node));
            $parent->addConcreteUse($parent->getFullNameFor($interface->getName()), $interface->getName());

            if (($documentation = $node->getDocComment()) !== null) {
                $this->documentationNodeParser->invoke($documentation, $interface);
            }

            $this->parseSubNodes($node->stmts, $interface);

            $parent->addInterface($interface);
        }
    }
1292250
public function belongsTo(NodeInterface $node)
	{
		parent::belongsTo($node);

		$rep = $this->sourceRepository;
		if ( ! ($rep instanceof RepositoryInterface)) {
			throw new Exception\WrongInstance($rep, 'RepositoryInterface');
		}
		$nestedSetRepository = $rep->getNestedSetRepository();
		/* @var $nestedSetRepository DoctrineRepository */
		
		$this->setRepository($nestedSetRepository);
		
		if ($this->right === null) {
			$nestedSetRepository->add($node);
		}
		$nestedSetRepository->register($node);
	}
1124311
public function add(NodeInterface $node)
    {
        if ($node instanceof BranchNodeInterface) {
            // this node is a branch
            $childFlow = $node->getPayload();
            $this->branchFlowCheck($childFlow);
            $childFlow->setParent($this);
        }

        $node->setCarrier($this);

        $this->flowMap->register($node, $this->nodeIdx);
        $this->nodes[$this->nodeIdx] = $node;

        ++$this->nodeIdx;

        return $this;
    }
146328
public function invoke($node, NodeInterface $parent): void
    {
        if (! $node instanceof Node\Stmt\GroupUse || ! $parent instanceof PhpFileModelInterface) {
            throw new Exception('GroupUseNodeParser is made to parse a use group node');
        }

        if ($this->validateType($node->type)) {
            $prefix = $node->prefix->toString();
            foreach ($node->uses as $use) {
                if ($this->validateType($node->type)) {
                    $parent->addUse($use->getAlias()->name, $prefix . '\\' . $use->name->toString());
                }
            }
        }
    }
539805
public function moveNode(Node $node, Node $parent)
    {
        $node->setParent($parent)->updateId();
        $this->idList[$node->id] = $node;

        return $this;
    }
1276009
private function parameterList(ParentNode $parent) {
    $node = new CommaListNode();
    $this->mustMatch('(', $parent, 'openParen');
    $parent->addChild($node, 'parameters');
    if ($this->tryMatch(')', $parent, 'closeParen', TRUE)) {
      return;
    }
    do {
      $node->addChild($this->parameter());
    } while ($this->tryMatch(',', $node));
    $this->mustMatch(')', $parent, 'closeParen', TRUE);
  }
376844
public function setParent(\Tx_Oelib_Visibility_Node $parentNode)
    {
        if ($this->parentNode !== null) {
            throw new \InvalidArgumentException('This node already has a parent node.', 1331488668);
        }

        $this->parentNode = $parentNode;
    }
295391
public function parseXml($node)
    {
        foreach ($node->childNodes as $item) {
            if ($item->nodeName != "#text") {
                $this->set( $item->nodeName, $item->nodeValue);
            }
        }

    }
47794
public function addNode(NodeInterface $node): NodeInterface
    {
        $this->_nodes[$node->getId()] = $node;

        if ($this->getParent()) {
            $this->getParent()->addNode($node);
        }

        return $this;
    }
719794
private function upgradeNode(NodeInterface $node)
    {
        foreach ($node->getProperties('i18n:-*') as $property) {
            $property->remove();
        }

        foreach ($node->getNodes() as $childNode) {
            $this->upgradeNode($childNode);
        }
    }
1060612
public function parseNodeChildren(\DOMNode $node, NodeInterface $target)
    {
        $rules = $this->getStandard()->getRules();
        foreach ($node->childNodes as $childNode) {
            /** @var RuleInterface $rule */
            foreach ($rules as $rule) {
                if ($rule->canHandle($childNode, $target)) {
                    $rule->handle($this, $childNode, $target);
                    break;
                }
            }
        }
    }
254512
public function mergeNode(ParentNode $node) {
    $child = $node->head;
    while ($child) {
      $next = $child->next;
      $this->appendChild($child);
      $child = $next;
    }
    foreach ($node->getChildProperties() as $name => $value) {
      $this->{$name} = $value;
    }
  }
159351
public function set_parent(Node_Container $parent=null)
	{
		$this->parent = $parent;

		if($parent instanceof Node_Container_Document)
			$this->root = $parent;
		else
			$this->root = $parent->root();
	}
233438
private function templateStatementList(ParentNode $node) {
    while ($this->current) {
      if ($this->currentType === T_OPEN_TAG) {
        return;
      }
      elseif ($this->currentType === T_INLINE_HTML) {
        $node->addChild($this->mustMatchToken(T_INLINE_HTML));
      }
      elseif ($this->currentType === T_OPEN_TAG_WITH_ECHO) {
        $node->addChild($this->echoTagStatement());
      }
      else {
        throw new ParserException(
          $this->filename,
          $this->iterator->getLineNumber(),
          $this->iterator->getColumnNumber(),
          'expected PHP opening tag, but got ' . $this->iterator->current()->getText());
      }
    }
  }