pub struct Token {
pub id: TokenId,
pub index: usize,
pub length: usize,
}
Expand description
A token in Earl contains where it appears in the code and its type or ID.
- The field
id
is what type of token this is. - The field
index
is the index of the byte where this token begins. - The field
length
is how many bytes this token spans.
Fields§
§id: TokenId
The ID or type of token.
index: usize
The index of where the token appears in the code.
length: usize
The length of the token in the code.
Implementations§
Trait Implementations§
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