/**
* @throws SyntaxError
*/
private function doParse(TokenStream
$stream, ?array
$names =
[]): Node\Node
{ $this->stream =
$stream;
$this->names =
$names;
$node =
$this->
parseExpression();
if (!
$stream->
isEOF()) { throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".',
$stream->current->type,
$stream->current->value
),
$stream->current->cursor,
$stream->
getExpression());
} unset($this->stream,
$this->names
);
return $node;
} /**
* @return Node\Node
*/