forked from VimPlug/jedi
fix a scope problem with the new fast parser
This commit is contained in:
@@ -140,6 +140,7 @@ class ParserNode(object):
|
|||||||
for key, c in self._contents.items():
|
for key, c in self._contents.items():
|
||||||
setattr(scope, key, c)
|
setattr(scope, key, c)
|
||||||
scope.is_generator = self._is_generator
|
scope.is_generator = self._is_generator
|
||||||
|
self.parser.user_scope = None
|
||||||
|
|
||||||
for c in self.children:
|
for c in self.children:
|
||||||
c.reset_contents()
|
c.reset_contents()
|
||||||
@@ -180,9 +181,9 @@ class ParserNode(object):
|
|||||||
for d in i.decorators:
|
for d in i.decorators:
|
||||||
d.parent = scope.use_as_parent
|
d.parent = scope.use_as_parent
|
||||||
content += items
|
content += items
|
||||||
if str(parser.module.name) == 'ordering':
|
if isinstance(parser.user_scope, pr.SubModule) \
|
||||||
#print scope.subscopes
|
and parser.start_pos <= parser.user_position < parser.end_pos:
|
||||||
pass
|
parser.user_scope = scope
|
||||||
scope.is_generator |= parser.module.is_generator
|
scope.is_generator |= parser.module.is_generator
|
||||||
|
|
||||||
def add_node(self, node):
|
def add_node(self, node):
|
||||||
|
|||||||
Reference in New Issue
Block a user