1
0
forked from VimPlug/jedi

Fix error statement stacks positions.

This commit is contained in:
Dave Halter
2015-02-02 10:43:47 +01:00
parent a4bd412801
commit f9fe6b47eb
2 changed files with 10 additions and 4 deletions

View File

@@ -404,7 +404,7 @@ class FastParser(use_metaclass(CachedFastParser)):
return self._get_node(unicode(''), unicode(''), 0, [], False)
added_newline = False
if source[-1] != '\n':
if not source or source[-1] != '\n':
# To be compatible with Pythons grammar, we need a newline at the
# end. The parser would handle it, but since the fast parser abuses
# the normal parser in various ways, we need to care for this