pub enum TokenType {
Show 61 variants
IntLiteral(i64),
Number(f64),
String(String),
Bool(bool),
HexColor(String),
Comment(String),
BlankLine,
Ident(String),
Var,
Varip,
Const,
Type,
Enum,
Method,
Export,
Import,
If,
Else,
For,
While,
Break,
Continue,
To,
In,
Switch,
Int,
Float,
Na,
And,
Or,
Not,
Plus,
Minus,
Star,
Slash,
Percent,
Equal,
NotEqual,
Less,
Greater,
LessEqual,
GreaterEqual,
Assign,
ColonAssign,
Arrow,
PlusAssign,
MinusAssign,
StarAssign,
SlashAssign,
LParen,
RParen,
LBracket,
RBracket,
Comma,
Dot,
Colon,
Question,
Newline,
Indent,
Dedent,
Eof,
}Variants§
IntLiteral(i64)
Number(f64)
String(String)
Bool(bool)
HexColor(String)
Comment(String)
A // comment’s text, verbatim and without the leading //. Emitted as
trivia for tools (the formatter); the parser filters it out.
BlankLine
An empty source line, emitted as trivia so tools can preserve paragraph breaks; the parser filters it out.
Ident(String)
Var
Varip
Const
Type
Enum
Method
Export
Import
If
Else
For
While
Break
Continue
To
In
Switch
Int
Float
Na
And
Or
Not
Plus
Minus
Star
Slash
Percent
Equal
NotEqual
Less
Greater
LessEqual
GreaterEqual
Assign
ColonAssign
Arrow
PlusAssign
MinusAssign
StarAssign
SlashAssign
LParen
RParen
LBracket
RBracket
Comma
Dot
Colon
Question
Newline
Indent
Dedent
Eof
Trait Implementations§
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 UnsafeUnpin 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