Keywords
Keywords are case-sensitive. If an identifier spellings match a keyword, it is read as that keyword, not as a user name.
Keyword list
| Spelling | Role |
|---|---|
is | Used in type and pattern positions where grammatically allowed |
void | Void type / literal contexts |
switch | Not supported in current Spine (reserved; may error if used) |
match | Match expressions |
if | Conditionals |
else | Branches |
default | Not supported in current Spine (reserved) |
throw | Not supported in current Spine (reserved) |
as | Cast: expr as Type |
Struct | Struct declarations; also allowed as some enum variant names |
Annotation | Annotation declarations and variant names |
Enum | Enum declarations and variant names |
namespace | Namespace blocks |
import | Imports |
return | Return from function or closure |
fail | Explicit failure with strategy |
break | Exit loop (optional value) |
continue | Continue loop |
stream | Used in stream-related grammar |
const | Constant inside function/closure body |
let | Binding inside function/closure body |
for | Loops |
while / do | Loops |
in | for x in iterable |
function | Top-level function |
true and false are boolean literals and cannot be used as ordinary identifiers.
Contextual names
These behave like ordinary identifiers except in declaration headings:
SingletoninSingleton Name : Type = valueIngest,Outlet,KeyValueApi, etc. as the leading type inType Name { ... }wired declarations
Elsewhere, Ingest and similar spellings are normal names.
@ and versions
@ after a name attaches a version (Thing@1). A lone @ starts an annotation on a field.