pub enum TokenType {
Show 58 variants
Ident(String),
Numeric(IntOrFloat),
String(Vec<u8>),
Bool(bool),
Nil,
Plus,
Minus,
Asterisk,
Slash,
Percent,
Caret,
Hash,
Ampersand,
Tilde,
Pipe,
LessLess,
GreaterGreater,
SlashSlash,
EqualEqual,
TildeEqual,
LessEqual,
GreaterEqual,
Less,
Greater,
Equal,
LParen,
RParen,
LBrace,
RBrace,
LBracket,
RBracket,
ColonColon,
Semicolon,
Colon,
Comma,
Dot,
DotDot,
DotDotDot,
And,
Break,
Do,
Else,
Elseif,
End,
For,
Function,
Goto,
If,
In,
Local,
Not,
Or,
Repeat,
Return,
Then,
Until,
While,
Eof,
}Expand description
classifies the type of token
Variants§
Ident(String)
Numeric(IntOrFloat)
String(Vec<u8>)
Bool(bool)
Nil
Plus
Minus
Asterisk
Slash
Percent
Caret
Hash
Ampersand
Tilde
Pipe
LessLess
GreaterGreater
SlashSlash
EqualEqual
TildeEqual
LessEqual
GreaterEqual
Less
Greater
Equal
LParen
RParen
LBrace
RBrace
LBracket
RBracket
ColonColon
Semicolon
Colon
Comma
Dot
DotDot
DotDotDot
And
Break
Do
Else
Elseif
End
For
Function
Goto
If
In
Local
Not
Or
Repeat
Return
Then
Until
While
Eof
Implementations§
source§impl TokenType
impl TokenType
pub fn into_ident(self) -> Option<String>
pub fn into_string(self) -> Option<Vec<u8>>
pub fn into_bool(self) -> Option<bool>
pub fn into_numeric(self) -> Option<IntOrFloat>
Trait Implementations§
impl Eq 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)