Module

nodes.variables

Variable and scoping nodes for Kida AST.

Classes

Let 3
Template-scoped variable: {% let x = expr %} or {% let x ??= expr %}

Template-scoped variable: {% let x = expr %} or {% let x ??= expr %}

Attributes

Name Type Description
name Expr
value Expr
coalesce bool
Set 3
Block-scoped variable: {% set x = expr %} or {% set x ??= expr %}

Block-scoped variable: {% set x = expr %} or {% set x ??= expr %}

Attributes

Name Type Description
target Expr
value Expr
coalesce bool
Export 3
Export variable from inner scope: {% export x = expr %} or {% export x ??= expr %}

Export variable from inner scope: {% export x = expr %} or {% export x ??= expr %}

Attributes

Name Type Description
name Expr
value Expr
coalesce bool
Capture 3
Capture block content: {% capture x %}...{% end %}

Capture block content: {% capture x %}...{% end %}

Attributes

Name Type Description
name str
body Sequence[Node]
filter Filter | None