pub enum Token {
Show 90 variants
IntLiteral(i64),
FloatLiteral(f64),
StringLiteral(String),
CharLiteral(char),
BoolLiteral(bool),
Ident(String),
Let,
Mut,
Fn,
Return,
If,
Else,
While,
Loop,
For,
In,
Break,
Continue,
Struct,
Impl,
Self_,
Enum,
Match,
Pub,
Use,
Mod,
As,
Ref,
I8,
I16,
I32,
I64,
I128,
U8,
U16,
U32,
U64,
U128,
F32,
F64,
Bool,
Char,
Str,
String_,
Usize,
Isize,
Plus,
Minus,
Star,
Slash,
Percent,
Eq,
EqEq,
NotEq,
Lt,
LtEq,
Gt,
GtEq,
And,
Or,
Not,
Ampersand,
Pipe,
Caret,
Tilde,
Shl,
Shr,
PlusEq,
MinusEq,
StarEq,
SlashEq,
PercentEq,
LParen,
RParen,
LBrace,
RBrace,
LBracket,
RBracket,
Comma,
Semicolon,
Colon,
ColonColon,
Arrow,
FatArrow,
Dot,
DotDot,
DotDotEq,
Hash,
Underscore,
Eof,
}Expand description
All token types recognized by the lexer.
Variants§
IntLiteral(i64)
FloatLiteral(f64)
StringLiteral(String)
CharLiteral(char)
BoolLiteral(bool)
Ident(String)
Let
Mut
Fn
Return
If
Else
While
Loop
For
In
Break
Continue
Struct
Impl
Self_
Enum
Match
Pub
Use
Mod
As
Ref
I8
I16
I32
I64
I128
U8
U16
U32
U64
U128
F32
F64
Bool
Char
Str
String_
Usize
Isize
Plus
Minus
Star
Slash
Percent
Eq
EqEq
NotEq
Lt
LtEq
Gt
GtEq
And
Or
Not
Ampersand
Pipe
Caret
Tilde
Shl
Shr
PlusEq
MinusEq
StarEq
SlashEq
PercentEq
LParen
RParen
LBrace
RBrace
LBracket
RBracket
Comma
Semicolon
Colon
ColonColon
Arrow
FatArrow
Dot
DotDot
DotDotEq
Hash
Underscore
Eof
Implementations§
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more