pub struct Token<'a> {
pub kind: SyntaxKind,
pub text: &'a str,
}Expand description
A single lexed token: a kind plus the verbatim source slice it covers.
text is always an exact slice of the input; the sum of all text lengths
equals the input length (INV-1).
Fields§
§kind: SyntaxKindToken classification.
text: &'a strVerbatim source text for this token (never normalized).
Trait Implementations§
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnsafeUnpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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