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. - Format
Spec - A format specification
[[fill] align] ["0"] [width] ["." precision]after the:of an interpolation (spec chapter 1, section 5.3a). - 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.
Enums§
- Align
- How an interpolation is aligned in its width.
- FPart
- A part of an interpolated string.
- Token
Kind - The kind of a token, with the value of literals.