pub struct TokenAndRange<'a> {
pub range: Range,
pub token: Token<'a>,
}
Expand description
A token with positional information.
Gets the byte index of the first character in the text.
Gets the line number of the start position in the text.
Gets the byte index after the last character in the text.
Gets the line number of the end position in the text.
Gets the text from the provided string.
Gets the start byte position.
Gets the end byte position.
Gets the end byte index minus the start byte index of the range.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.