Remove immediate child from the end of this node
@return ParseNode
488279
function pop(){
		if( ! $this->length ){
			return null;
		}
		if( --$this->length <= 0 ){
			$this->length = 0;
			$this->p = null;
		}
		else {
			$this->p = 0;
		}
		$Node = array_pop( $this->children );
		$Node->pidx = null;
		$Node->depth = 0;
		return $Node;
	}
11732
function removeChild(parEl, el) {
	var node = el._node;

	// already marked for removal
	if (node._dead) { return; }

	var res = deepNotifyRemove(node);

	if (res != null && isProm(res)) {
		node._dead = true;
		res.then(curry(_removeChild, [parEl, el, true]));
	}
	else
		{ _removeChild(parEl, el); }
}
226002
public function after()
    {
        $this->importNodes(\func_get_args(), function ($node, $imported_node) {
            if ($node->nextSibling) {
                $node->parentNode->insertBefore($imported_node, $node->nextSibling);
            } else { // node is last, so there is no next sibling to insert before
                $node->parentNode->appendChild($imported_node);
            }
        });

        return $this;
    }
1228582
public T removeLast()
   {
      T element = elementData[--size];
      elementData[size] = null;
      return element;
   }
275007
public E pollLast() {
        final Node<E> l = last;
        return (l == null) ? null : unlinkLast(l);
    }
1246077
private function doWhile() {
    $node = new DoWhileNode();
    $this->mustMatch(T_DO, $node, NULL, FALSE, TRUE);
    $node->addChild($this->statement(), 'body');
    $this->mustMatch(T_WHILE, $node, 'whileKeyword');
    $this->condition($node, 'condition');
    $this->endStatement($node);
    return $node;
  }
98933
public function getLastTokenPosition()
    {
        $endNamespaceTokenPosition = $this->namespaceNode->getAttribute('endTokenPos');

        /** @var Node $lastNamespaceNode */
        $lastNamespaceNode         = end($this->namespaceNode->stmts);
        $endStatementTokenPosition = $lastNamespaceNode->getAttribute('endTokenPos');

        return max($endNamespaceTokenPosition, $endStatementTokenPosition);
    }
675115
function push_thru( ParseNode $Node ){
		foreach( $Node->children as $Child ){
			$Node->remove( $Child );
			$this->push( $Child );
		}
		return $this->length;
	}
789189
public function remove() {
		$p = $this->getParent();
		if (null == $p) {
			throw new LogicException();
		}
		$p->removeChildAt( $this->getChildIndex() );
		return $this;
	}
656934
public function end()
    {
        if ($this->currentExpressionGroup) {
            if (null != ($parentGroup = $this->currentExpressionGroup->getParentGroup())) {
                $this->currentExpressionGroup = $parentGroup;
            } else {
                $this->currentExpressionGroup = null;
            }
        }

        return $this;
    }
494370
public function lastChild()
    {
        $node = $this->node->lastChild;

        if ($node === null) {
            return null;
        }

        return new Element($node);
    }
64427
public function pop()
    {
        if ($this->isEmpty()) {
            throw new UnderflowException();
        }

        // Last leaf of the heap to become the new root.
        $leaf = array_pop($this->heap);

        if (empty($this->heap)) {
            return $leaf->value;
        }

        // Cache the current root value to return before replacing with next.
        $value = $this->getRoot()->value;

        // Replace the root, then sift down.
        $this->setRoot($leaf);
        $this->checkCapacity();

        return $value;
    }
954052
public function finish()
    {
        unset( $this->part->recipients[$this->section - 1] ); // because one extra recipient is created in parseHeader()
        $this->part->size = $this->size;
        return $this->part;
    }
1022796
public function remove()
    {
        if ($this->node->parentNode === null) {
            throw new LogicException('Can not remove element without parent node');
        }

        $removedNode = $this->node->parentNode->removeChild($this->node);

        return new Element($removedNode);
    }
1320140
public function end()
    {
        $definition = $this->definitions[$this->context];

        $this->context = $this->definitions[$this->context]['parent'];

        $this->definitions[$this->context]['children'][] = $definition;

        return $this;
    }
588466
public function removeFirst(): self
    {
        $tmpArray = $this->getArray();

        \array_shift($tmpArray);

        return static::create(
            $tmpArray,
            $this->iteratorClass,
            false
        );
    }
1349270
public function clear() {
        $children = $this->children();
        foreach ($children as $file) {
            $file->delete();
        }
        return $this;
    }