From 45aa5e8ea725b1fa738a4326b1dfd57a093624a8 Mon Sep 17 00:00:00 2001 From: Xinlong Hu Date: Fri, 1 Aug 2025 21:37:11 -0500 Subject: [PATCH] 3.6/3.7/3.8 Adjusting With --- pylingual/control_flow_reconstruction/templates/With.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylingual/control_flow_reconstruction/templates/With.py b/pylingual/control_flow_reconstruction/templates/With.py index 65bcf7c..c24a33b 100644 --- a/pylingual/control_flow_reconstruction/templates/With.py +++ b/pylingual/control_flow_reconstruction/templates/With.py @@ -1,5 +1,5 @@ from ..cft import ControlFlowTemplate, EdgeKind, register_template -from ..utils import T, N, exact_instructions, starting_instructions, without_instructions, to_indented_source, make_try_match, versions_from +from ..utils import T, N, exact_instructions, starting_instructions, without_top_level_instructions, to_indented_source, make_try_match, versions_from class WithCleanup3_11(ControlFlowTemplate): @@ -83,7 +83,7 @@ class With3_9(ControlFlowTemplate): @register_template(0, 10, (3, 6), (3, 7), (3, 8)) class With3_6(ControlFlowTemplate): template = T( - setup_with=~N("with_body", None).with_cond(without_instructions("SETUP_FINALLY")), + setup_with=~N("with_body", None).with_cond(without_top_level_instructions("SETUP_FINALLY", "SETUP_EXCEPT")), with_body=N("buffer_block.", None, "normal_cleanup").with_in_deg(1), buffer_block=~N("normal_cleanup.", None).with_in_deg(1), normal_cleanup=~N.tail(),