Syntax Rules
This page focuses on rules that are easy to forget and worth documenting exactly.
Semicolons
Section titled “Semicolons”Semicolons are not part of normal statement syntax.
They are only used as separators inside classic for (...) clauses:
for (var i i32 = 0; i < 3; i += 1) { print(i)}Newline continuation
Section titled “Newline continuation”Continuation is explicit and token-based. Tokens such as (, [, ., as,
assignment operators, and binary operators must stay on the same line as the
expression they continue.
Valid shape:
print(1 + 2)Invalid shape:
print(1 + 2)After the continuation token is consumed, the rest of the call, index, or member access may span later lines.
++ and --
Section titled “++ and --”A newline before ++ or -- starts a new prefix expression. It does not keep
continuing the previous line as a postfix update.
Trailing commas
Section titled “Trailing commas”Trailing commas in call argument lists are currently not supported.
Imports
Section titled “Imports”Import paths must be string literals. For source modules, include the full
filename such as ./math.kel.
Export visibility
Section titled “Export visibility”Capitalized top-level names are exported from source modules. Lowercase names are private module implementation details.
Foreach over dictionaries
Section titled “Foreach over dictionaries”Iterate an explicit projection such as dict.keys() instead of iterating the
dictionary directly.