Skip to content

Commit

Permalink
reset the internal state when the parser is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed May 31, 2020
1 parent 2af156d commit d58eb02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Symfony/Component/ExpressionLanguage/Parser.php
Expand Up @@ -124,6 +124,9 @@ private function doParse(TokenStream $stream, ?array $names = []): Node\Node
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;
}

Expand Down

0 comments on commit d58eb02

Please sign in to comment.