Move get_comp_fors out of the parser.

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

No files matched your search

-10
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