Draft

This specification is a skeleton. Only the chapters listed as “Draft” below exist, and they cover only what has been decided. Nothing here is final. Progress is tracked in cesiumlang/cesiumlang.org#13.

The language reference explains Cesium by example, for people learning and using the language. This specification is the more technical document derived from it: the definition a compiler or tool can be checked against. The reference pages and their code examples are its source material, together with the decision records and design issues in cesiumlang/cesium.

How to Read This Specification

Status Markers

Every rule carries one of three statuses.

MarkerMeaning
DecidedRecorded as a decision. The rule cites the issue or page it comes from
ProvisionalA recommendation by the editors, not a decision. Always inside a “Provisional” callout that names the issue where it is being discussed
OpenNot decided. The specification states no rule and links to the issue

If a rule has no citation, treat it as a defect in the specification and report it.

Citations

Rules cite their source in square brackets:

Grammar Notation

Grammars are written in EBNF:

NotationMeaning
name = ... ;A production
"text"A terminal: the literal characters
a ba followed by b
a | ba or b
[ a ]Optional a
{ a }Zero or more a
( a )Grouping
(* ... *)A comment

Chapters

#ChapterStatus
1Introduction and conventionsThis page
2Lexical structureDraft: decided parts only
3Syntactic grammar: the S0 subsetDraft
3Syntactic grammar: S1 and the full languageNot started. Blocked on cesiumlang/cesium#27, #28, #29 and #57
4TypesNot started. Open: cesiumlang/cesium#16, #34, #36, #38
5ExpressionsNot started. Open: cesiumlang/cesium#15, #26, #33, #35
6StatementsNot started. Open: cesiumlang/cesium#41, #49
7DeclarationsNot started. Open: cesiumlang/cesium#19, #47, #52
8Ownership rulesNot started. The decided rules are in cesiumlang/cesium#11 and summarized in Memory Management. Open: cesiumlang/cesium#21 to #25
9MIR mappingNot started. The S0 mapping is in chapter 3; the IR is described in Middle IR
10Conformance levelsOutline below

Conformance Levels

The bootstrap chain defines nested subsets of the language ([cesium#9]). Each compiler stage must accept its level, and every later compiler must keep accepting the levels below it.

LevelDefined byAccepted byStatus
S0Chapter 3Stage 0 and every later compilerDraft
S1To be writtencesium1 and every later compilerOpen: the S1 feature list is a set of candidates to be confirmed (cesiumlang/cesium#9)
FullThe whole specificationThe real compilerOpen: which features are core, planned or unproven is cesiumlang/cesium#58

Each level is a strict subset of the next: a program that conforms to a level is a valid program of every higher level, with the same meaning ([cesium#9], rule 1).

A conformance test suite of valid and invalid programs for each level is planned (cesiumlang/cesium#57, step 3).

2 items under this folder.