pub enum TokenType {
Show 43 variants
LeftBrak,
RightBrack,
LeftBrace,
RightBrace,
Comma,
Dot,
Plus,
Minus,
Semicolon,
FSlash,
Star,
Not,
Equal,
Less,
Greater,
NotEqual,
EqualEqual,
GreaterEqual,
LessEqual,
Comment,
DocComment(String),
HeaderComment(String),
Identifier(String),
StringLit(String),
NumLit(i64),
FloatLit(f64),
And,
Class,
Else,
False,
Func,
For,
If,
Null,
Or,
Print,
Return,
Super,
This,
True,
Var,
While,
Eof,
}
Expand description
The token type, represents the type of a Token after scanning.
All token types are guaranteed to be displayed using fmt::Display in a
human-readable fashion, please reference that if you would like to see what
each type looks like in chars (it is found in Trait Implementations
).
Variants§
LeftBrak
RightBrack
LeftBrace
RightBrace
Comma
Dot
Plus
Minus
Semicolon
FSlash
Star
Not
Equal
Less
Greater
NotEqual
EqualEqual
GreaterEqual
LessEqual
Comment
DocComment(String)
HeaderComment(String)
Identifier(String)
StringLit(String)
NumLit(i64)
FloatLit(f64)
And
Class
Else
False
Func
For
If
Null
Or
Return
Super
This
True
Var
While
Eof
Special eof used for end of scan runs
Trait Implementations§
Source§impl PartialOrd for TokenType
impl PartialOrd for TokenType
impl StructuralPartialEq for TokenType
Auto Trait Implementations§
impl Freeze for TokenType
impl RefUnwindSafe for TokenType
impl Send for TokenType
impl Sync for TokenType
impl Unpin for TokenType
impl UnwindSafe for TokenType
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