pub struct Token {
pub kind: TokenKind,
pub start: usize,
pub end: usize,
pub line: u32,
pub column: u32,
}Expand description
One lexical unit and its exact position in the source.
Fields§
§kind: TokenKind§start: usizeByte range in the source; source[start..end] is the token text.
end: usize§line: u32One-based line of the first byte.
column: u32One-based column, counted in characters, of the first byte.
Implementations§
Trait Implementations§
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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