pub struct Token {
pub kind: TokenKind,
pub start_pos: usize,
pub end_pos: usize,
}
Expand description
A single textual entity of a program like (
or if
.
The literal values contained in tokens are not parsed until they’re needed to avoid issues coming from the interaction between hash maps and float values.
Fields§
§kind: TokenKind
§start_pos: usize
§end_pos: usize
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 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