Move get_comp_fors out of the parser.
This commit is contained in:
1 parent
4cd7f40e3b
commit
1625834f81
3 files changed
+15
-11
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user