Skip to content
Snippets Groups Projects
Commit 16a11f0f authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Clear list of last possibilities when current expression has no possibilities.

parent effcdda4
No related branches found
No related tags found
No related merge requests found
......@@ -285,6 +285,13 @@ class Parser(BisonParser):
"""
if option == 1: # rule: EXP NEWLINE
self.root_node = values[0]
# Clear list of last possibilities when current expression has no
# possibilities. Otherwise, an invalid expression gets the last
# possibilities of a valid expression.
if not self.possibilities:
self.last_possibilities = []
return values[0]
if option == 2: # rule: DEBUG NEWLINE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment