Module

compiler.statements

Statement compilation for Kida compiler.

Provides mixins for compiling Kida statement AST nodes to Python AST statements.

The statements package is organized into logical modules:

  • basic: Basic output (data, output)
  • control_flow: Control flow (if, for)
  • variables: Variable assignments (set, let, export)
  • template_structure: Template structure (block, include, from_import)
  • functions: Functions/macros (macro, def, call_block, slot)
  • special_blocks: Special blocks (with, do, raw, capture, cache, filter_block)

Uses inline TYPE_CHECKING declarations for host attributes. See: plan/rfc-mixin-protocol-typing.md

Classes

StatementCompilationMixin 0
Combined mixin for compiling all statement types. This class combines all statement compilation mi…

Combined mixin for compiling all statement types.

This class combines all statement compilation mixins into a single interface that can be inherited by the Compiler class.

Host attributes and cross-mixin dependencies are declared via inline TYPE_CHECKING blocks in each individual mixin.