Skip to content

Commit 8823bc8

Browse files
committed
Fix error recovery bug in Eco grammar
When editing the Ecogrammar grammar and an error occurs, out-of-context analysis fails due to the incparser instance having no `lang` attribute (for all other grammars based on EcoFile this is not the case). This commit fixes this by setting `lang` to None by default.
1 parent a1618b6 commit 8823bc8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/eco/incparser/incparser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def __init__(self, grammar=None, lr_type=LR0, whitespaces=False, startsymbol=Non
107107
self.autolboxes = None
108108
self.autodetector = None
109109
self.option_autolbox_find = False
110+
self.lang = None
110111

111112
def is_valid_symbol(self, state, token):
112113
return self.syntaxtable.lookup(state, token) is not None

0 commit comments

Comments
 (0)