pub enum TokenType {
Show 54 variants
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Dot,
Comma,
Plus,
Percent,
Minus,
Semicolon,
Not,
NotEqual,
Equal,
EqualEqual,
Greater,
GreaterEqual,
Less,
QuestionMark,
LessEqual,
Slash,
Colon,
RawString,
Star,
String,
Bytes,
RawBytes,
Ident,
Int(i64),
Uint(u64),
Double(f64),
And,
As,
Break,
Const,
Else,
False,
For,
Function,
If,
Import,
Let,
Loop,
Null,
In,
Or,
True,
Var,
Package,
Namespace,
Void,
While,
Dyn,
}Expand description
TokenType represents the type of the token. It is used by the parser to build the AST. The parser is responsible for deciding how to interpret the token.
Variants§
LeftParen
RightParen
LeftBracket
RightBracket
LeftBrace
RightBrace
Dot
Comma
Plus
Percent
Minus
Semicolon
Not
NotEqual
Equal
EqualEqual
Greater
GreaterEqual
Less
QuestionMark
LessEqual
Slash
Colon
RawString
Star
String
Bytes
RawBytes
Ident
Int(i64)
Uint(u64)
Double(f64)
And
As
Break
Const
Else
False
For
Function
If
Import
Let
Loop
Null
In
Or
True
Var
Package
Namespace
Void
While
Dyn
Trait Implementations§
impl Copy 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