pub enum TokenData {
BooleanLiteral(bool),
EOF,
Identifier(String),
Keyword(Keyword),
NullLiteral,
NumericLiteral(f64),
Punctuator(Punctuator),
StringLiteral(String),
RegularExpression(String),
Comment(String),
}
Expand description
Represents the type of Token
Variants
BooleanLiteral(bool)
A boolean literal, which is either true
or false
EOF
The end of the file
Identifier(String)
An identifier
Keyword(Keyword)
A keyword
NullLiteral
A null
literal
NumericLiteral(f64)
A numeric literal
Punctuator(Punctuator)
A piece of punctuation
StringLiteral(String)
A string literal
RegularExpression(String)
A regular expression
Comment(String)
A comment
Trait Implementations
impl StructuralPartialEq for TokenData
Auto Trait Implementations
impl RefUnwindSafe for TokenData
impl Send for TokenData
impl Sync for TokenData
impl Unpin for TokenData
impl UnwindSafe for TokenData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more