let, if, and return
Control a bounded handler’s local execution.
Quick reference
| Syntax | Behavior |
|---|---|
let name be expression | Declare an immutable block-local value. |
if condition then … else … end | Branch on a boolean. |
return | Stop the handler, running finally cleanup. |
Example
<Button title="Continue" on-press="let ready be true; if ready then emit continued else return end" />
Rules and validation
Ordinary adjacent commands require semicolons. Compound statements end at their matching end; line breaks do not terminate commands. Locals cannot shadow visible names. Use state for values shared beyond a lexical block. Script comments are unsupported; use XML comments outside attributes.