pub enum TokenKind {
Identifier,
Keyword,
Number,
String,
RegExp,
Template,
Punctuator,
Trivia,
End,
}Expand description
Kind of lossless token.
Variants§
Identifier
IdentifierName, including escaped spelling.
Keyword
Reserved or contextual keyword spelling.
Number
Numeric literal.
String
String literal.
RegExp
Regular-expression literal.
Template
No-substitution template or template segment.
Punctuator
Punctuator.
Trivia
Whitespace, line terminator, comment, or hashbang.
End
End marker.
Trait Implementations§
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnsafeUnpin for TokenKind
impl UnwindSafe for TokenKind
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