pub enum TokenKind {
}Expand description
The typed variant discriminator on the caixa-ast lexer surface — every
Token’s carrying-shape (delimiter, reader-macro, atom, trivia)
projects through this closed twenty-one-arm partition.
The gen_platform::IsVariant derive emits per-arm arm-discriminator
predicates — Self::is_l_paren, Self::is_r_paren,
Self::is_l_brace, Self::is_r_brace, Self::is_l_bracket,
Self::is_r_bracket, Self::is_quote, Self::is_quasiquote,
Self::is_unquote, Self::is_unquote_splice, Self::is_str,
Self::is_int, Self::is_float, Self::is_bool, Self::is_nil,
Self::is_symbol, Self::is_keyword, Self::is_shebang,
Self::is_line_comment, Self::is_newlines, Self::is_whitespace
— so every downstream consumer that only needs the arm-discriminator
projection (not the borrowed field value) reaches for one typed dispatch
on the substrate primitive rather than a hand-rolled matches!(k, TokenKind::X | TokenKind::Y(_)) literal. Peer of the sibling
crate::NodeKind / crate::trivia::TriviaKind IsVariant lifts
already on the caixa-ast surface (7f6aa98 / 44873ae) — extends the same
discipline onto the token-family axis every downstream lexer / parser /
authoring consumer partitions on (the internal tokenize test-harness
trivia filter today, a future caixa-lint no-tab-indentation or
no-map-in-defcaixa-slot rule that walks tokens before parsing).
Variants§
Shebang(String)
A verbatim #!… first line. See crate::trivia::TriviaKind::Shebang.