Expand description
Lexical analysis: convert source text into a stream of tokens.
Structs§
- Lexer
- Simple lexer over a UTF-8 string.
- Span
- A span in the source file, represented as a byte range.
- Token
- A token with its kind, source span, and associated trivia.
Enums§
- Keyword
- Language keywords (subset for the MVP).
- Token
Kind - Token kinds produced by the lexer.
- Trivia
- Trivia represents non-semantic content: whitespace and comments. Used by the formatter to preserve comments and intentional blank lines.
Constants§
- KEYWORDS
- List of all Husk keywords.
Functions§
- is_
keyword - Check if a string is a Husk reserved keyword.
- is_
valid_ identifier - Check if a string is a valid Husk identifier.