pub enum TokenKind {
Name,
Keyword,
Number,
String,
FString,
TemplateString,
Operator,
Newline,
Indent,
Dedent,
Trivia,
End,
}Expand description
Kind of a lossless lexical token.
Variants§
Name
Identifier, including contextual soft-keyword spellings.
Keyword
Reserved keyword.
Number
Numeric literal with its original spelling retained.
String
Ordinary string or bytes literal.
FString
Formatted string literal.
TemplateString
Python 3.14 template string literal.
Operator
Operator or delimiter.
Newline
Physical line ending.
Indent
Significant indentation increase.
Dedent
Significant indentation decrease (zero-width).
Trivia
Spaces, tabs, form feeds, comments, or escaped newlines.
End
End marker (zero-width).
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