Set so there a newline after a node.

@param Node $node
Node to set newline after.
486667
protected function newlineAfter(Node $node) {
    $next = $node->nextToken();
    if ($next instanceof WhitespaceNode) {
      $next->setText($this->getNewlineIndent($next));
    }
    else {
      $node->after(Token::whitespace($this->getNewlineIndent()));
    }
  }
1213664
public function leaveNode(Node $node)
    {
        if ($node instanceof Node\FunctionLike) {
            foreach ($node->params as $param) {
                if ($param->variadic) {
                    $vParam = array_pop($node->params);
                    $node->stmts = $this->addFuncGetArgs(
                        $node->stmts,
                        $node->params,
                        $vParam
                    );
                    $node->params = [];
                    return;
                }
            }
        }
    }
1017676
public function add_node(node $node) {
        $name = $node->name;
        if (isset($this->nodes[$name])) {
            throw new \coding_exception("Node name $name already used");
        }
        $this->nodes[$node->name] = $node;
    }
27995
public function enterNode(Node $node)
    {
        if ($node instanceof Class_ || $node instanceof Trait_) {
            $this->inClass = true;
        } elseif ($node instanceof FuncCall && !$this->inClass) {
            // We'll give any args at all (besides null) a pass.
            // Technically we should be checking whether the args are objects, but this will do for now.
            //
            // @todo switch this to actually validate args when we get context-aware code cleaner passes.
            if (!empty($node->args) && !$this->isNull($node->args[0])) {
                return;
            }

            // We'll ignore name expressions as well (things like `$foo()`)
            if (!($node->name instanceof Name)) {
                return;
            }

            $name = \strtolower($node->name);
            if (\in_array($name, ['get_class', 'get_called_class'])) {
                $msg = \sprintf('%s() called without object from outside a class', $name);
                throw new ErrorException($msg, 0, E_USER_WARNING, null, $node->getLine());
            }
        }
    }
783263
public function mutate(Node $node)
    {
        yield from $this->converters[$node->name->toLowerString()]($node);
    }
551708
public function apply(AbstractNode $node): void
    {
        if (!$this->isFacade($node)) {
            return;
        }

        $this->applyRule($node);
    }
249453
public function visitAfter(Node $node): void
    {
        foreach ($this->visitors as $visitor) {
            $visitor->visitAfter($node);
        }

        parent::visitAfter($node);
    }
85975
public function wrap(Node $node) : void
    {
        $last = $this->scope->getLastChild(); // Get the last inserted node
        $this->scope->removeLastChild(); // Remove it

        $this->insert($node);
        $this->traverseUp();

        $this->insert($last);
    }
1260761
protected function _assignLine($index, $node, $line)
    {
        if ($node->lines['start'] === null) {
            $node->lines['start'] = $index;
        }
        $node->lines['stop'] = $index;
        if (trim($line)) {
            $this->_root->lines['content'][$index]['nodes'][] = $node;
        }
    }
552701
public function enterNode(Node $node)
    {
        if ($node instanceof Class_) {
            if ($node->extends) {
                $extends = (string) $node->extends;
                if ($this->isFinalClass($extends)) {
                    $msg = \sprintf('Class %s may not inherit from final class (%s)', $node->name, $extends);
                    throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine());
                }
            }

            if ($node->isFinal()) {
                $this->finalClasses[\strtolower($node->name)] = true;
            }
        }
    }
338031
public function resolveNextNode(NodeContract $node, NodeContract $new_node)
    {
        if ($new_node->next() && $new_node->next() instanceof ComparableNodeContract) {
            $new_node->moveNodeAsChild($new_node->next());
        } else {
            throw new Exceptions\QuerySyntaxException($node->getRoot()->getValue());
        }
    }
347572
function restore($old, $new) {
        // We append the next element after this point. If $after is not yet set, we prepend to $new
        // and then set $after to the node just prepended.
        var $after;
        $new.contents().each(function() {
          var $node = $(this);
          var handled = false;
          var $nodeOld;
          if (is($node, 'preserve')) {
            $nodeOld = findVal($old, 'preserve', attr($node, 'preserve'));
            $after = $nodeOld;
            handled = true;
          } else if (is($node, 'preserves')) {
            $nodeOld = findVal($old, 'preserves', attr($node, 'preserves'));
            if ($nodeOld.length) {
              restore($nodeOld, $node);
              $after = $nodeOld;
              handled = true;
            }
          }
          if (!handled) {
            if ($after) {
              $after.after($node);
            } else {
              $old.prepend($node);
            }
            $after = $node;
          }
        });
      }
1004170
private function deleteNode( $node ) {
		$this->deleteChildren( $node );
		$parent = $node->parentNode;
		$oldnode = $parent->removeChild( $node );
	}
273882
public function appendNode($new_node)
    {
        $pos = $this->count();
        $new_node->setPosition($pos);
        $this->push($new_node);
    }
455620
public void insertSiblingAfter(Node node) {
    if (node != null) {
      node.setNextSibling(getNextSibling());
      node.setPrevSibling(this);
    }
  }
19180
public function makeChildOf(Node $node, Node $newParent)
    {

        // Collect some informations before the node is changed to correct
        // the nodes in its old position
        $nodeWasNew = !$node->exists;
        $oldParentId = $node->getParentId();
        $oldPosition = $node->getPosition();

        // Get new position
        $position = $this->getLastChildPosition($newParent);

        // Set the position of this node. Default is last position in new Parent
        $node[$this->getPositionName()] = $position;

        $this->performMakeChildOf($node, $node);

        // If the node existed correct the positions of the old parent
        if(!$nodeWasNew && $oldParentId){
            $this->decrementOrderAfter($oldParentId, $oldPosition);
        }

        return $this;

    }
399230
def node_insert_after(self, node, new_node):
        """"""

        assert(not self.node_is_on_list(new_node))
        assert(node is not new_node)

        next = self.node_next(node)
        assert(next is not None)
        self.node_set_next(node, new_node)
        self.node_set_prev(new_node, node)

        self.node_set_next(new_node, next)
        self.node_set_prev(next, new_node)