ShortCircuitAnd adjustment

Was previously not matching
if a:
    if b:
        print(c)

which turned into
if a:
    if b:
        pass
    print(c)
This commit is contained in:
Xinlong Hu
2025-08-14 11:52:39 -05:00
committed by Joel-Flores123
parent d7ea284c29
commit fab055f35f
@@ -127,7 +127,7 @@ class Assertion(ControlFlowTemplate):
class ShortCircuitAnd(ControlFlowTemplate): class ShortCircuitAnd(ControlFlowTemplate):
template = T( template = T(
A=~N("B", "tail"), 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(), body=~N.tail(),
tail=N.tail(), tail=N.tail(),
) )