Repository navigation
Lexical syntax
.expec uses braces to group declarations and newlines to separate sibling statements. Indentation helps people read the source but does not determine nesting.
An ordinary name begins with an ASCII letter or underscore and continues with letters, digits or underscores. Names and built-in type spellings are case-sensitive: Text is a built-in type; text is a different name.
Use backticks for names with spaces, punctuation or reserved words. Use double quotes for text values, scenario titles, promises and file locators.
main.expec
concept `Store Game` {
public `save game`
capability `save game`(title: Text) returns Nothing {
promises "Save the selected game."
}
}catalog.Item is a qualified reference with two parts. A backtick-quoted name containing a dot is one name. Quoting changes spelling, not visibility or whether the name must be declared.
Put each record field, concept member, contract clause and scenario step on its own line. An empty block or a block with one member can fit on one line. A final newline before } is optional. A callable's opening body brace belongs on its declaration line.
main.expec
type Settings {
title: Text = "Store Game"
levels: List<Number> = [
1,
2,
3,
]
}
function start(
settings: Settings,
enabled: Boolean = true,
) returns Nothing {
promises "Start using the supplied settings."
}Parameters, type arguments, tuple/list elements, call arguments and record-literal entries use commas. They can span lines and accept a trailing comma. Newlines do not replace those commas.
An expression outside one of these delimited contexts ends at a newline. Put a multiline calculation in parentheses. Semicolons are not statement separators.
// starts a comment through the end of the line. There is no block-comment syntax.
main.expec
// A declared default, not a running application setting.
type Display {
brightness: Number = 80 // Percent chosen for this example.
}| Form | Examples |
|---|---|
| Text |
"Dune", ""
|
| Number |
0, 12.5, 1e3, 2.5E-2; a minus sign is written before the number |
| Boolean |
true, false
|
| List or tuple value | [1, 2] |
| Record value | Cart { itemsCount: 1 } |
Text supports escaped double quotes, backslashes, newline \n, carriage return \r, tab \t and four-digit Unicode escapes. Surrogate escapes must form valid pairs. Backtick names support escaping a backtick or backslash; they do not use the text-string escape set. Quoted names cannot be empty. Literal text cannot cross a physical line or contain raw control characters.
There is no null literal. An optional type describes absence; it does not add a null expression.
Related: Expressions and operators · Keyword index
Home · Keyword index · Released source 36748015 · pr-44 package
Reference edition: October 7, 2026. Checked language examples do not establish implemented runtime behavior.