This commit is contained in:
Joel Flores
2025-06-23 10:56:15 -05:00
parent d5b4dc0555
commit 53e888d397
2 changed files with 8 additions and 1 deletions
@@ -19,6 +19,7 @@ class Await3_12(ControlFlowTemplate):
to_indented_source = defer_source_to("awaited")
@register_template(0, 0)
class AwaitWith3_12(ControlFlowTemplate):
template = T(
@@ -33,6 +34,7 @@ class AwaitWith3_12(ControlFlowTemplate):
to_indented_source = defer_source_to("awaited")
@register_template(0, 0)
class Generator3_12(ControlFlowTemplate):
template = T(
@@ -2,6 +2,7 @@ from typing import override
from ..cft import ControlFlowTemplate, EdgeKind, register_template
from ..utils import T, N, exact_instructions, starting_instructions, to_indented_source, make_try_match, versions_from
class WithCleanup3_11(ControlFlowTemplate):
template = T(
start=N("reraise", "poptop", "exc").with_cond(
@@ -22,6 +23,7 @@ class WithCleanup3_11(ControlFlowTemplate):
{pop_exc}
"""
@register_template(0, 10, (3, 11), (3, 12), (3, 13))
class With3_11(ControlFlowTemplate):
template = T(
@@ -42,6 +44,7 @@ class With3_11(ControlFlowTemplate):
{exc_cleanup}
"""
class WithCleanup3_9(ControlFlowTemplate):
template = T(
start=~N("reraise", "poptop").with_cond(
@@ -60,6 +63,7 @@ class WithCleanup3_9(ControlFlowTemplate):
{poptop}
"""
@register_template(0, 10, (3, 9), (3, 10))
class With3_9(ControlFlowTemplate):
template = T(
@@ -79,6 +83,7 @@ class With3_9(ControlFlowTemplate):
{exc_cleanup}
"""
@register_template(0, 10, (3, 6), (3, 7), (3, 8))
class With3_6(ControlFlowTemplate):
template = T(
@@ -95,4 +100,4 @@ class With3_6(ControlFlowTemplate):
"""
{setup_with}
{with_body}
"""
"""