null
and renders as the empty string.
Interpolation forms
${ expr } and { expr } are the same node in text position. The brace form is
shorter; the dollar form is unambiguous, because a bare { in text starts an
expression:
${ "{" }.
Precedence
Loosest first. All binary operators are left-associative, including the comparisons, soa < b < c parses as (a < b) < c.
Operator semantics
Any arithmetic result that is NaN or infinite silently becomes 0.
Arithmetic coerces, comparison does not
| int or | float whenever a value might arrive as a
string. Money always does; a server decimal serialises to JSON as "49.990000".
Truthiness
Literals
Pass collections and objects through the render context.
Operators that do not exist
=== !== ?? ?. in ** typeof instanceof, every bitwise operator,
every assignment operator, and arrow functions. Each is a parse or lex error, not a
silent no-op.
There is no ?. because none is needed: . is always null-safe. For a null
fallback use | default(...) rather than ??.
Paths
{each} loop variable. With
items = ["a","b","c"] and i = 1, ${ items[i] } renders b.
After a . only an identifier is accepted, so a.0 is a parse error and a[0] is
the only form.
Reactive paths
$name marks a path as reactive for the optional browser runtime. Server-side it
resolves exactly like a plain path, so ${ $cart.total } and ${ cart.total }
render identically.
Function calls
f(a, b) PARSES and ALWAYS evaluates to null. There are no built-in callable
functions of any kind, no way to register one, and no diagnostic.
Scoping
The page context is the root scope.{each} and {fetch} create child scopes, and
a child shadows its parent.
Components and layouts render in their OWN root scope: the page globals, overlaid by
whatever was passed explicitly, with the explicit values winning on collision. So a
component CAN read a page global it was never passed.
Escaping by context
An interpolation is escaped for exactly where it lands. The compiler selects the escaper from the position.
A
style slot losing characters is reported as a warning in development mode only.
A production render strips silently.