Add generator expression Python 3.0 .. 3.2

This commit is contained in:
rocky
2022-11-05 10:15:45 -04:00
parent 98626ee162
commit 9d1cf50c5e
2 changed files with 7 additions and 1 deletions

View File

@@ -15,6 +15,12 @@ class Python32Parser(Python3Parser):
store_locals ::= LOAD_FAST STORE_LOCALS
"""
def p_gen_comp(self, args):
"""
genexpr_func ::= LOAD_ARG FOR_ITER store comp_iter JUMP_BACK
"""
def p_32to35(self, args):
"""
if_exp ::= expr jmp_false expr jump_forward_else expr COME_FROM