From 00150c088c0ea6030c38dc0f04c29d2be97c3f9c Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Tue, 19 Jun 2018 16:24:02 -0700 Subject: [PATCH] Remove an unused helper method in the compiler --- hy/compiler.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index 2103928..a3f2b5c 100755 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -946,32 +946,6 @@ class HyASTCompiler(object): elts, ret, _ = self._compile_collect(args) return ret + asty.Tuple(expr, elts=elts, ctx=ast.Load()) - def _compile_generator_iterables(self, trailers): - """Helper to compile the "trailing" parts of comprehensions: - generators and conditions""" - - generators = trailers.pop(0) - - cond = self.compile(trailers.pop(0)) if trailers else Result() - - gen_it = iter(generators) - paired_gens = zip(gen_it, gen_it) - - gen_res = Result() - gen = [] - for target, iterable in paired_gens: - gen_res += self.compile(iterable) - gen.append(ast.comprehension( - target=self._storeize(target, self.compile(target)), - iter=gen_res.force_expr, - ifs=[], - is_async=False)) - - if cond.expr: - gen[-1].ifs.append(cond.expr) - - return gen_res + cond, gen - _loopers = many( tag('setv', sym(":setv") + FORM + FORM) | tag('if', sym(":if") + FORM) |