Skip to main content

Module lexer

Module lexer 

Source
Expand description

Converts the text of a types file into tokens.

Structs§

Token
A token and where it starts.

Enums§

Tok
A token of a types file or a values file.

Constants§

KEYWORDS
The words that the lexer gives their own tokens, so that they cannot be the name of anything.

Functions§

lex
Splits text into tokens, always ending with a single Tok::Eof.
strip_bom
Removes a byte order mark from the start of the text, as rustc does for a source file. Some editors add one, and it is not a part of the text: the first character that is left is at line 1, col 1.