pub enum Tok {
}Expand description
A token of a types file or a values file.
Variants§
Enum
The keyword enum.
Const
The keyword const.
TypeName(String)
An identifier starting with an uppercase letter.
Name(String)
An identifier starting with a lowercase letter or underscore, other than enum and const.
Eq
=.
Comma
,.
Semi
;.
Lt
<.
Gt
>.
LBrace
{.
RBrace
}.
LParen
(.
RParen
).
LBracket
[.
RBracket
].
Colon
:.
ColonColon
::, which follows the group or the full name of a project in a qualified name.
Dot
., which separates the parts of the full name of a project in a qualified name.
Question
The postfix ?, which is shorthand for Option in a type and for Some in a value.
Nat(String)
An unsigned integer literal, such as 42, with its text unchanged.
Int(String)
A signed integer literal, such as +8 or -1.
Float(String)
A floating-point literal, such as 3.0 or -2.5e3.
Str(String)
A string literal, with its escapes decoded.
Invalid(char)
A character that cannot start any token. The parser reports it as a syntax error.
Error(String)
A malformed literal. The token’s position is that of the offending character.
Eof
The end of the text.