Skip to content

Commit

Permalink
Another 3.7 chained comparison rule
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed May 14, 2019
1 parent 46acb74 commit 9db446d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion uncompyle6/parsers/parse37.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def p_37misc(self, args):
compare_chained37 ::= expr compare_chained1a_37
compare_chained37 ::= expr compare_chained1b_37
compare_chained37_false ::= expr compare_chained1_false_37
compare_chained37_false ::= expr compare_chained2_false_37
Expand All @@ -103,12 +104,15 @@ def p_37misc(self, args):
compare_chained2a_false_37 ELSE POP_TOP JUMP_BACK COME_FROM
compare_chained2a_37 ::= expr COMPARE_OP POP_JUMP_IF_TRUE JUMP_FORWARD
compare_chained2a_false_37 ::= expr COMPARE_OP POP_JUMP_IF_FALSE JUMP_FORWARD
compare_chained2a_false_37 ::= expr COMPARE_OP POP_JUMP_IF_FALSE jf_cfs
compare_chained2b_37 ::= expr COMPARE_OP come_from_opt POP_JUMP_IF_FALSE JUMP_FORWARD ELSE
compare_chained2b_37 ::= expr COMPARE_OP come_from_opt POP_JUMP_IF_FALSE JUMP_FORWARD
compare_chained2c_37 ::= expr DUP_TOP ROT_THREE COMPARE_OP come_from_opt POP_JUMP_IF_FALSE
compare_chained2a_false_37 ELSE
compare_chained2c_37 ::= expr DUP_TOP ROT_THREE COMPARE_OP come_from_opt POP_JUMP_IF_FALSE
compare_chained2a_false_37
jf_cfs ::= JUMP_FORWARD come_froms
ifelsestmt ::= testexpr c_stmts_opt jf_cfs else_suite opt_come_from_except
Expand Down

0 comments on commit 9db446d

Please sign in to comment.