Skip to content

Commit 6675d93

Browse files
committed
reset the internal state when the parser is finished
1 parent f8344b9 commit 6675d93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Parser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ private function doParse(TokenStream $stream, ?array $names = []): Node\Node
124124
throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
125125
}
126126

127+
$this->stream = null;
128+
$this->names = null;
129+
127130
return $node;
128131
}
129132

0 commit comments

Comments
 (0)