YASL reserves the following keywords, which may not be used as identifiers:
Additionally, the keywords header, global, enum, yield, do, use, no, pure, consteval, constexpr, constfold, extern, struct, pragma, and in are reserved for possible future use and may not be used as identifiers.
An assert statement will check that the given expression is truthy. If it is, program execution proceeds as normal. If not, a fatal error happens and program execution is halted.
break exits from a while or for loop, skipping all remaining iterations.
const is used in variable declarations to make it impossible to reassign a variable. Note that the variable is still mutable if it is a mutable type.
continue skips the current iteration of a while or for loop, resuming at the next iteration.
An echo statement is used to log a value to standard out.
else is used in if statements to denote a block that is executed if the condition is falsey.
elseif is used in if statements to denote a block that is executed if the previous condition if falsey, and the current condition is truthy.
Literal boolean false.
fn is used to declare functions.
for is used to start a for loop, or in list and table comprehensions to introduce the iteration variable(s).
if is used in if statements, or in list and table comprehensions to introduce a condition to filter the list with.
let is used for variable declarations.
len is the length operator.
match is used in match statements.
return is used in function declarations to return a value.
Literal boolean true.
Literal undef.
while is used to introduce while loops.