pub struct LexToken {
pub kind: SyntaxKind,
pub text: SmolStr,
pub range: TextRange,
}Expand description
A single lexed token: kind, original text, and byte range.
Fields§
§kind: SyntaxKindClassification of the token (keyword, identifier, literal, …).
text: SmolStrExact source text the token spans. Trivia tokens keep their whitespace / comment text verbatim.
range: TextRangeByte range the token occupies in the source.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LexToken
impl RefUnwindSafe for LexToken
impl Send for LexToken
impl Sync for LexToken
impl Unpin for LexToken
impl UnsafeUnpin for LexToken
impl UnwindSafe for LexToken
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