Expand description
The wolfpack lexer: source text to tokens (spec chapter 1).
The lexer is written by hand. It never stops at an error: every problem becomes a
diagnostic, the offending text becomes an TokenKind::Error token, and lexing continues.
It never panics on any input.
Structs§
- Comment
- An ordinary comment. It has no meaning for the language, but is kept for
wolf fmt. - Invalid
Utf8 - A file whose bytes are not valid UTF-8 (spec chapter 1, rule 1.1).
- Lexed
- The result of lexing one file.
- Token
- A token: its kind and where it is.