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
idis what type of token this is. - The field
indexis the index of the byte where this token begins. - The field
lengthis how many bytes this token spans.
Fields§
§id: TokenIdThe ID or type of token.
index: usizeThe index of where the token appears in the code.
length: usizeThe 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 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