protected function closeNodes( int$level=0 ):self
	{
		if( empty($this->openedNodes) ) return $this;

		while( $level-->=0 ){
			$node= array_pop($this->openedNodes);

			$node->scope and $this->removeScope($node);

			$closer=$node->close($this->currentLine) and $this->appendLine($closer);

			$this->level-= $level>=0 ?1:0;
		}

		return $this;
	}