Split ifs
LiftThenBody
dataclass
LiftThenBody(
exclude_stmts: tuple[type[Statement], ...] = tuple(),
)
Bases: RewriteRule
Lifts anything that's not in the exclude_stmts
in the then body
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exclude_stmts
|
tuple[type[Statement], ...]
|
A tuple of statement types that should not be lifted from the then body. Defaults to an empty tuple, meaning all statements are lifted. |
tuple()
|
SplitIfStmts
Bases: RewriteRule
Splits the then body of an if-else statement into multiple if statements