1
0
forked from VimPlug/jedi

Simple error recovery in the parser: For now just discard everything that is not a suite or file_input, if we detect an error.

This commit is contained in:
Dave Halter
2014-10-30 01:40:22 +01:00
parent f09ff04fcc
commit 1bb0eccc86
2 changed files with 14 additions and 2 deletions

View File

@@ -534,7 +534,7 @@ class Scope(Simple, DocstringMixin):
if is_node(c, 'simple_stmt'):
names += chain.from_iterable(
[s.get_defined_names() for s in c.children
if isinstance(s, (ExprStmt, Import, KeywordStatement))])
if isinstance(s, (ExprStmt, Import))])
elif isinstance(c, (Function, Class)):
names.append(c.name)
return names