Skip to content

Syntax Rules

This page focuses on rules that are easy to forget and worth documenting exactly.

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)
}

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.

A newline before ++ or -- starts a new prefix expression. It does not keep continuing the previous line as a postfix update.

Trailing commas in call argument lists are currently not supported.

Import paths must be string literals. For source modules, include the full filename such as ./math.kel.

Capitalized top-level names are exported from source modules. Lowercase names are private module implementation details.

Iterate an explicit projection such as dict.keys() instead of iterating the dictionary directly.