Expand description
Token and syntax-node definitions for the Praxis language.
Per §14.1 of the design, this crate owns the token kinds and the lossless
syntax tree node kinds. The tree is rowan-backed (ADR-003): this crate
contributes the SyntaxKind vocabulary, the PraxisLanguage tag that
binds it to rowan, and the SyntaxNode/SyntaxToken/SyntaxElement
type aliases.
The modules:
kind— the singleSyntaxKindenum (tokens, trivia, tree nodes).ident— the one identifier character class (§4.1).interp— the one rule for where a"…"literal ends and where its interpolation holes are (§8.1, ADR-147), shared by the lexer’s pre-scan and its resume path.literal— the one text-literal decoder (§4.3).numeric— the one digit-separator rule for numeric literals (§4.3).template— the one rule for where a backtick template ends (§7.2, D10), shared by the lexer and the input parser’s template scanner.language— the rowanLanguageimpl and node aliases.span_bridge—Span↔rowan::TextRangeconversions (the only place the two offset worlds meet; PraxisSpanstays the diagnostic source of truth).
Re-exports§
pub use kind::SyntaxKind;pub use language::PraxisLanguage;pub use language::SyntaxElement;pub use language::SyntaxNode;pub use language::SyntaxToken;
Modules§
- ident
- The one identifier character class for the whole workspace (§4.1).
- interp
- Where a
"…"literal ends and where its holes are — one answer, for both readers (§8.1, ADR-147). - kind
- The single vocabulary of Praxis syntax: tokens, trivia, and tree nodes.
- language
- The rowan
Languageglue that gives Praxis a strongly-typed lossless tree. - literal
- The one literal decoder for the whole workspace (§4.3).
- numeric
- The one digit-separator rule for numeric literals (§4.3).
- span_
bridge - Bridge between Praxis spans and rowan’s text offsets.
- template
- Where a backtick template ends — one answer, for both scanners (D10).
Structs§
- Token
- A token the lexer emits before it is folded into the lossless tree: its kind, the source span it covers, and whether a line break sits in front of it.
Constants§
- MAX_
INTERPOLATION_ NESTING - How deeply
"…"literals may nest inside each other’s interpolation holes (§8.1, ADR-147). - MAX_
TEMPLATE_ NESTING - How deeply backtick templates may nest inside each other’s captures (D10).