Statements & control flow
Statements and control flow: conditionals, loops, switch and match, guards, extraction, loop and function transfer, and the diagnostic statements.
Return to the grammar overview.
Terms#
These are the words you write in this part of the language. Each links to its page. The second column names the grammar rule the word belongs to.
| Term | Grammar rule |
|---|---|
if | si_stmt |
elif | si_tail |
else | secus_clause |
while | dum_stmt |
range, ref, from, const, for, var | itera_stmt |
at | apud_clause |
switch | elige_stmt |
case | casu_elige_clause |
default | ceterum_clause |
match, all | discerne_stmt |
and | discriminants |
case | casu_variant_clause |
guard | custodi_stmt |
if | si_guard_clause |
from, const, var | ex_stmt |
as | extract_field |
rest | ceteri_field |
return | redde_stmt |
return_await | reddet_stmt |
await | tacebit_stmt |
yield | cede_stmt |
break | rumpe_stmt |
continue | perge_stmt |
pass | tacet_stmt |
assert, panic | adfirma_stmt |
throw, require | requirit_stmt |
throw, reject | reice_stmt |
warn, write, debug | nota_stmt |
while, do | fac_stmt |
Formal grammar#
The rules for this part of the language are the parser's own definition of it. They are written for models and tools, so this page does not repeat them; the full list is at every production.