classes and functions are new statements and should never get removed by the error recovery.
This commit is contained in:
1 parent
128dbd34b6
commit
31600b9552
3 files changed
+9
-2
No files matched your search
@@ -166,8 +166,9 @@ class Parser(object):
|
||||
# Done parsing, but another token is input
|
||||
raise ParseError("too much input", type, value, start_pos)
|
||||
else:
|
||||
self.error_recovery(self.grammar, self.stack, type, value, start_pos)
|
||||
break
|
||||
if self.error_recovery(self.grammar, self.stack, type,
|
||||
value, start_pos):
|
||||
break
|
||||
|
||||
def classify(self, type, value, start_pos):
|
||||
"""Turn a token into a label. (Internal)"""
|
||||
|
||||
Reference in new issue
Block a user