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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user