pub struct Token<'source> {
pub span: Range<usize>,
pub kind: TokenKind,
pub lexeme: &'source str,
}Expand description
A token produced by the tokenizer.
Fields§
§span: Range<usize>The region of the source code that this token originated from.
kind: TokenKindThe kind of token.
lexeme: &'source strThe raw lexeme that was parsed into this token.
Implementations§
Trait Implementations§
impl<'source> StructuralPartialEq for Token<'source>
Auto Trait Implementations§
impl<'source> Freeze for Token<'source>
impl<'source> RefUnwindSafe for Token<'source>
impl<'source> Send for Token<'source>
impl<'source> Sync for Token<'source>
impl<'source> Unpin for Token<'source>
impl<'source> UnwindSafe for Token<'source>
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