Classes
CallableParameterPlan
2
▼
One callable parameter before Python AST assembly.
CallableParameterPlan
2
▼
One callable parameter before Python AST assembly.
Attributes
| Name | Type | Description |
|---|---|---|
name |
str
|
— |
annotation |
str | None
|
— |
CallableSignaturePlan
8
▼
Semantic callable signature shared by def and region lowering.
CallableSignaturePlan
8
▼
Semantic callable signature shared by def and region lowering.
Attributes
| Name | Type | Description |
|---|---|---|
public_name |
str
|
— |
function_name |
str
|
— |
parameters |
tuple[CallableParameterPlan, ...]
|
— |
parameter_names |
tuple[str, ...]
|
— |
bound_names |
tuple[str, ...]
|
— |
default_parameter_names |
tuple[str, ...]
|
— |
vararg |
str | None
|
— |
kwarg |
str | None
|
— |
CallSlotPlan
4
▼
One call-block slot before callback AST assembly.
CallSlotPlan
4
▼
One call-block slot before callback AST assembly.
Attributes
| Name | Type | Description |
|---|---|---|
name |
str
|
— |
function_name |
str
|
— |
body |
tuple[Node, ...]
|
— |
delegates_when_nested |
bool
|
— |
CallBlockPlan
3
▼
Ordered slot callbacks for one call block.
CallBlockPlan
3
▼
Ordered slot callbacks for one call block.
Attributes
| Name | Type | Description |
|---|---|---|
call |
Expr
|
— |
slots |
tuple[CallSlotPlan, ...]
|
— |
slot_function_items |
tuple[tuple[str, str], ...]
|
— |
SlotBindingPlan
2
▼
One scoped binding passed from a slot placeholder.
SlotBindingPlan
2
▼
One scoped binding passed from a slot placeholder.
Attributes
| Name | Type | Description |
|---|---|---|
name |
str
|
— |
expression |
Expr
|
— |
SlotRenderPlan
4
▼
Slot placeholder semantics before expression and body lowering.
SlotRenderPlan
4
▼
Slot placeholder semantics before expression and body lowering.
Attributes
| Name | Type | Description |
|---|---|---|
name |
str
|
— |
bindings |
tuple[SlotBindingPlan, ...]
|
— |
binding_names |
tuple[str, ...]
|
— |
body |
tuple[Node, ...]
|
— |
Functions
plan_def_signature
1
CallableSignaturePlan
▼
Build the immutable signature plan for a template def.
plan_def_signature
1
CallableSignaturePlan
▼
def plan_def_signature(node: Def) -> CallableSignaturePlan
Parameters
| Name | Type | Description |
|---|---|---|
node |
Def |
Returns
CallableSignaturePlan
plan_region_signature
2
CallableSignaturePlan
▼
Build the immutable signature plan for a template region.
plan_region_signature
2
CallableSignaturePlan
▼
def plan_region_signature(node: Region, *, emitted_name: str | None = None) -> CallableSignaturePlan
Parameters
| Name | Type | Description |
|---|---|---|
node |
Region |
|
emitted_name |
str | None |
Default:None
|
Returns
CallableSignaturePlan
_slot_body_is_empty
1
bool
▼
Treat whitespace-only data as an empty slot body.
_slot_body_is_empty
1
bool
▼
def _slot_body_is_empty(body: tuple[Node, ...]) -> bool
Parameters
| Name | Type | Description |
|---|---|---|
body |
tuple[Node, ...] |
Returns
bool
plan_call_block
1
CallBlockPlan
▼
Build ordered immutable callback plans for a call block.
plan_call_block
1
CallBlockPlan
▼
def plan_call_block(node: CallBlock) -> CallBlockPlan
Parameters
| Name | Type | Description |
|---|---|---|
node |
CallBlock |
Returns
CallBlockPlan
_plan_call_slot
2
CallSlotPlan
▼
Build one slot plan after freezing its body sequence.
_plan_call_slot
2
CallSlotPlan
▼
def _plan_call_slot(name: str, body: tuple[Node, ...]) -> CallSlotPlan
Parameters
| Name | Type | Description |
|---|---|---|
name |
str |
|
body |
tuple[Node, ...] |
Returns
CallSlotPlan
plan_slot_render
1
SlotRenderPlan
▼
Build the immutable binding and body plan for a slot placeholder.
plan_slot_render
1
SlotRenderPlan
▼
def plan_slot_render(node: Slot) -> SlotRenderPlan
Parameters
| Name | Type | Description |
|---|---|---|
node |
Slot |
Returns
SlotRenderPlan