mirror of
https://github.com/syssec-utd/pylingual.git
synced 2026-05-10 18:39:03 -07:00
Duplicate JumpTemplate oops
This commit is contained in:
@@ -54,27 +54,6 @@ class RemoveUnreachable(ControlFlowTemplate):
|
||||
return node
|
||||
|
||||
|
||||
@register_template(0, 0)
|
||||
class JumpTemplate(ControlFlowTemplate):
|
||||
template = T(
|
||||
body=~N("jump", None).with_cond(without_instructions("CLEANUP_THROW")),
|
||||
jump=N("tail", "block.").with_in_deg(1).with_cond(exact_instructions("JUMP_BACKWARD_NO_INTERRUPT"), exact_instructions("POP_JUMP_IF_TRUE")),
|
||||
block=~N.tail(),
|
||||
tail=N.tail(),
|
||||
)
|
||||
|
||||
try_match = make_try_match(
|
||||
{
|
||||
EdgeKind.Fall: "tail",
|
||||
EdgeKind.TrueJump: "block",
|
||||
},
|
||||
"body",
|
||||
"jump",
|
||||
)
|
||||
|
||||
to_indented_source = defer_source_to("body")
|
||||
|
||||
|
||||
@register_template(0, 0)
|
||||
class JumpTemplate(ControlFlowTemplate):
|
||||
template = T(
|
||||
|
||||
Reference in New Issue
Block a user