# statements

URL: /kida/api/compiler/statements/
Section: statements
Description: 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, while, break, continue)
- pattern_matching: Match/case structural pattern matching
- variables: Variable assignments (set, let, export)
- template_structure: Template structure (block, include, from_import)
- functions: Functions/macros (macro, def, call_block, slot)
- with_blocks: With-block scoped variable bindings
- caching: Cache blocks and filter blocks
- special_blocks: Remaining special blocks (raw, capture, spaceless, embed)

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

---

> For a complete page index, fetch /kida/llms.txt.

Open LLM text
(/kida/api/compiler/statements/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fcompiler%2Fstatements%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fcompiler%2Fstatements%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fcompiler%2Fstatements%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fcompiler%2Fstatements%2Findex.txt)

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, while, break, continue)

- pattern_matching: Match/case structural pattern matching

- variables: Variable assignments (set, let, export)

- template_structure: Template structure (block, include, from_import)

- functions: Functions/macros (macro, def, call_block, slot)

- with_blocks: With-block scoped variable bindings

- caching: Cache blocks and filter blocks

- special_blocks: Remaining special blocks (raw, capture, spaceless, embed)

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

1Class

## 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.
