Handle comprehensions inside a lambda

This commit is contained in:
rocky
2023-08-11 12:13:46 -04:00
parent 48a0a411b8
commit 20af515dda
7 changed files with 34 additions and 1 deletions

View File

@@ -37,11 +37,16 @@ class Python27Parser(Python2Parser):
dict_comp ::= LOAD_DICTCOMP MAKE_FUNCTION_0 expr GET_ITER CALL_FUNCTION_1
stmt ::= dict_comp_func
dict_comp_func ::= BUILD_MAP_0 LOAD_FAST FOR_ITER store
comp_iter JUMP_BACK RETURN_VALUE RETURN_LAST
dict_comp_func ::= BUILD_MAP_0 LOAD_FAST FOR_ITER store
comp_iter JUMP_BACK RETURN_VALUE_LAMBDA LAMBDA_MARKER
set_comp_func ::= BUILD_SET_0 LOAD_FAST FOR_ITER store comp_iter
JUMP_BACK RETURN_VALUE RETURN_LAST
set_comp_func ::= BUILD_SET_0 LOAD_FAST FOR_ITER store comp_iter
JUMP_BACK RETURN_VALUE_LAMBDA LAMBDA_MARKER
comp_iter ::= comp_if_not
comp_if_not ::= expr jmp_true comp_iter