Cesium logo Cesium

Grammar Reference

November 24, 2026

Cesium does not have a complete formal grammar yet. Writing one is tracked in cesiumlang/cesium#57, and it is being published as part of the language specification (cesiumlang/cesiumlang.org#13).

What Exists Today

ResourceWhat it is
Language Specification (draft)The formal definition, in progress
Specification: Lexical StructureTokens, comments, identifiers, keywords and literals, with the undecided parts marked
Specification: the S0 subsetThe grammar and rules of S0, the part of the language the first compiler stage accepts
cesiumlang/grammarThe TextMate grammar used for syntax highlighting on this site and in editors. It is regex-based and is not a definition of the language

Known Gaps

These syntax questions have to be answered before a grammar for the full language can be written:

QuestionIssue
Function definitions (T = name(...) {) cannot always be told apart from assignmentscesiumlang/cesium#27
Decorated operators collide with postfix transpose; bitwise NOT has no spellingcesiumlang/cesium#28
Angle-bracket generics are ambiguous with comparison operatorscesiumlang/cesium#29
Several operators have no precedence levelcesiumlang/cesium#15
Numeric literal forms are not specifiedcesiumlang/cesium#56
String and character literals, escapescesiumlang/cesium#39
The reserved-word listcesiumlang/cesium#50
Cesium 0.2.0, in development (dev at 53dc38a) · GitHub