Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

Annotations & directives

Keyword spelling

An annotation is a @ line that attaches to the declaration below it. It does not run. It tells the compiler a fact about that declaration: that it is exported, that it is a command-line program, that a kernel, compiler lane, or capability applies.

The generic shape is @ plus a name, optionally with fields in braces. @ public marks a function an importer can see. @ cli names the binary a package produces. The same family covers @ radix, @ call, and the accepted legacy kernel annotation @ kernel — specialized directives most source meets later. The table below lists the words those directives use.

@ public
fn saluta(string nomen) → string {
    return "Salve, §!"(nomen)
}

A command-line entry uses the same @ shape above main args:

@ cli { name = "echo" }
@ description "Prints text"
@ operand { rest = true, type = string, binding = words }
main args argv {
    for from argv.words let word {
        print word
    }
}

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.

TermGrammar rule
kernelnucleum_sugar
kernelnucleum_braced
false, truenucleum_field
mut, typeradix_directive
callad_annotation
unstable, unstablenondum_annotation

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.