From fab055f35f1b559b2d212766278456d35cf04812 Mon Sep 17 00:00:00 2001 From: Xinlong Hu Date: Thu, 14 Aug 2025 11:52:39 -0500 Subject: [PATCH] ShortCircuitAnd adjustment Was previously not matching if a: if b: print(c) which turned into if a: if b: pass print(c) --- pylingual/control_flow_reconstruction/templates/Conditional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylingual/control_flow_reconstruction/templates/Conditional.py b/pylingual/control_flow_reconstruction/templates/Conditional.py index ecf641c..1355f25 100644 --- a/pylingual/control_flow_reconstruction/templates/Conditional.py +++ b/pylingual/control_flow_reconstruction/templates/Conditional.py @@ -127,7 +127,7 @@ class Assertion(ControlFlowTemplate): class ShortCircuitAnd(ControlFlowTemplate): template = T( A=~N("B", "tail"), - B=~N("body", "tail").with_in_deg(1), + B=~N("body", "tail").with_in_deg(1).with_cond(has_no_lines), body=~N.tail(), tail=N.tail(), )