Expand description
The one classification truth for LOGOS tokens: parts of speech ARE the syntax — verbs paint as functions, nouns as types, adjectives as modifiers. Every highlighting surface (LSP semantic tokens, the terminal REPL, any future renderer) derives its colors from THIS mapping, so they can never disagree.
The match is deliberately wildcard-free: adding a TokenType variant
does not compile until someone decides its class — the decision lives
here, next to the enum, not in an editor plugin.
Enums§
- Token
Class - What a token IS, presentation-wise. Mirrors the LSP semantic-token vocabulary (the LSP legend maps 1:1; the REPL maps to ANSI colors).
Functions§
- classify
- Classify a token by its part of speech.
None= structural tokens (indent/dedent/newline/EOF) that no surface paints.