reset the internal state when the parser is finished

This commit is contained in:
Christian Flothmann 2020-05-31 09:33:39 +02:00
parent 2af156d6fe
commit d58eb020d0

View File

@ -124,6 +124,9 @@ class Parser
throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
}
$this->stream = null;
$this->names = null;
return $node;
}