Classes
ControlFlowBlockParsingMixin
7
▼
Mixin for parsing control flow blocks.
Host attributes and cross-mixin dependencies are declared v…
ControlFlowBlockParsingMixin
7
▼
Mixin for parsing control flow blocks.
Host attributes and cross-mixin dependencies are declared via inline TYPE_CHECKING blocks. Inherits block stack management from BlockStackMixin.
Methods
Internal Methods 7 ▼
_parse_unless
0
If
▼
Parse {% unless cond %} as {% if not cond %}.
Part of RFC: kida-modern-syntax-…
_parse_unless
0
If
▼
def _parse_unless(self) -> If
Parse {% unless cond %} as {% if not cond %}.
Part of RFC: kida-modern-syntax-features. Supports {% end %}, {% endif %}, and {% endunless %}.
Returns
If
_parse_break
0
Break
▼
Parse {% break %} loop control.
Part of RFC: kida-modern-syntax-features.
_parse_break
0
Break
▼
def _parse_break(self) -> Break
Returns
Break
_parse_continue
0
Continue
▼
Parse {% continue %} loop control.
Part of RFC: kida-modern-syntax-features.
_parse_continue
0
Continue
▼
def _parse_continue(self) -> Continue
Returns
Continue
_parse_while
0
While
▼
Parse {% while cond %}...{% end %} or {% endwhile %}.
Kida-native while loop f…
_parse_while
0
While
▼
def _parse_while(self) -> While
Parse {% while cond %}...{% end %} or {% endwhile %}.
Kida-native while loop for condition-based iteration.
Syntax:
{% while items | length > 0 %}
{{ items | pop }}
{% end %}
Part of RFC: kida-2.0-moonshot (While Loops).
Returns
While
_parse_if
0
If
▼
Parse {% if %} ... {% end %} or {% endif %}.
Supports unified {% end %} as wel…
_parse_if
0
If
▼
def _parse_if(self) -> If
Parse {% if %} ... {% end %} or {% endif %}.
Supports unified {% end %} as well as explicit {% endif %}. Also handles {% elif %} and {% else %} clauses.
Returns
If
_parse_for
0
For
▼
Parse {% for %} ... {% end %} or {% endfor %.
Supports unified {% end %} as we…
_parse_for
0
For
▼
def _parse_for(self) -> For
Parse {% for %} ... {% end %} or {% endfor %.
Supports unified {% end %} as well as explicit {% endfor %}. Also handles {% else %} and {% empty %} clauses. Supports inline if filter: {% for x in items if x.visible %} Part of RFC: kida-modern-syntax-features (inline if).
Returns
For
_parse_match
0
Match
▼
Parse {% match expr %}{% case pattern %}...{% end %}.
Pattern matching for cle…
_parse_match
0
Match
▼
def _parse_match(self) -> Match
Parse {% match expr %}{% case pattern %}...{% end %}.
Pattern matching for cleaner branching than if/elif chains. Reuses the existing _parse_body infrastructure for case bodies.
Syntax:
{% match page.type %}
{% case "post" %}...
{% case "gallery" %}...
{% case _ %}...
{% end %}
The underscore (_) is the wildcard/default case.
Returns
Match