Expand description
The RIDL family reserved-word registry (typl reference §1.4).
The family maintains one reserved-word registry across every profile: every word in it is reserved in every profile, including words a profile does not accept. The ADR-0012 domain spellings are not in it: a spelling is a keyword only as the first token of an interface member, in a profile that implements it. This module is the single source of truth the lexer maps identifiers against, and the source a governance test can read.
An identifier that matches a keyword the active Profile uses lexes to
that keyword’s SyntaxKind; one that matches any other registry word lexes
to SyntaxKind::ReservedWord; anything else stays an
Ident.
Enums§
- Profile
- The profile a source file is lexed and parsed under (ridl reference §2,
ADR-0008): which member of the family the file is written in. The profile
selects which registry words are active keywords — every other registry
word stays
SyntaxKind::ReservedWord— and where the parser draws its profile-boundary diagnostics (TYPL-304 / RIDL-403).
Constants§
- FAMILY_
RESERVED - The full family reserved-word registry (typl reference §1.4): the words the
typl profile uses, followed by the words reserved family-wide for the other
profiles but rejected by
.typl. This is the governance source of truth — every word here is reserved in every profile and may not be an identifier.
Functions§
- is_
reserved - Whether
textis reserved anywhere in the family — a keyword the typl profile uses or a word reserved for another profile. A reserved word may not be used as an identifier in any profile. - keyword_
in - The
SyntaxKindtextlexes to as an active keyword ofprofile, orNonewhen the profile does not use it — it may still be a reserved word of another profile (is_reserved) or an ordinary identifier. - ridl_
keyword - The
SyntaxKindone of the nine ridl words lexes to underProfile::Ridl, orNoneiftextis not one of them. The parser also uses this table to spot an interaction keyword in a typl parse (TYPL-304). - rsdl_
keyword - The
SyntaxKindone of the eight rsdl words lexes to underProfile::Rsdl, orNoneiftextis not one of them. - typl_
keyword - The
SyntaxKinda typl keyword lexes to, orNoneiftextis not a keyword the typl profile uses (it may still be a reserved word — seeis_reserved).