1
0
forked from VimPlug/jedi

More test fixes.

This commit is contained in:
Dave Halter
2016-05-31 01:12:07 +02:00
parent c12dbe0b9e
commit ad8d730a57
6 changed files with 27 additions and 17 deletions

View File

@@ -121,11 +121,9 @@ class PgenParser(object):
break
else:
# We never broke out -- EOF is too soon -- Unfinished statement.
# TODO the arcs argument [] is not correctly defined.
self.error_recovery(self.grammar, self.stack, [], type_, value,
start_pos, prefix, self.addtoken)
# Add the ENDMARKER again.
if not self.addtoken(type_, value, prefix, start_pos):
# However, the error recovery might have added the token again, if
# the stack is empty, we're fine.
if self.stack:
raise InternalParseError("incomplete input", type_, value, start_pos)
return self.rootnode