1
0
forked from VimPlug/jedi

Move get_comp_fors out of the parser.

This commit is contained in:
Dave Halter
2017-04-08 14:16:00 +02:00
parent 4cd7f40e3b
commit 1625834f81
3 changed files with 15 additions and 11 deletions

View File

@@ -1120,16 +1120,6 @@ class CompFor(PythonBaseNode):
type = 'comp_for'
__slots__ = ()
def get_comp_fors(self):
yield self
last = self.children[-1]
while True:
if isinstance(last, CompFor):
yield last
elif not last.type == 'comp_if':
break
last = last.children[-1]
def is_scope(self):
return True