Syntax, Values, And Control
Current implementation evidence: docs/language.html and examples under
examples/.
Forms
0x0 source uses parenthesized forms:
(head arg1 arg2)
The compiler accepts current top-level forms for modules, imports, functions,
and top-level docs. Other top-level forms are rejected by semantic validation.
Values
The current source language supports:
I64integer literals;- text string literals with common escapes;
trueandfalse;Unit;- lists through list builtins;
- symbol references for parameters and local bindings.
Examples:
42
"hello"
true
(list 1 2 3)
Control
if has exactly three operands:
(if condition then-expression else-expression)
do evaluates expressions in order and returns the final expression:
(do
(print "ready")
42)
Local Bindings
≔ introduces ordered local bindings:
(≔ ((left 20)
(right 22))
(+ left right))
Bindings are available to later bindings and to the body.
Current Limit
0x0 does not currently document the old jmp0x1b/lang algebraic data type
syntax as implemented source syntax. Current library data conventions use
tagged lists and helpers.