Tentative fix for issue #437. I added a new set of rules in ifelsestmt.py to check against for offsets. Seems to have fixed current issue. The result output is switching nested if-else-if-else-etc to a chain of if-elif-elif now, but semantically seems correct.

This commit is contained in:
Andre Eberle
2023-04-08 16:54:55 -04:00
parent f76c35c902
commit 7f3c1fa3a4

View File

@@ -81,6 +81,16 @@ IFELSE_STMT_RULES = frozenset(
"come_froms",
),
),
(
'ifelsestmtc',
(
'testexpr',
'c_stmts_opt',
'JUMP_FORWARD',
'else_suite',
'come_froms'
),
),
(
"ifelsestmt",
(