pub struct Token<'a> {
pub sym: Sym<'a>,
pub line: u32,
pub col: u32,
}Expand description
A token with position information.
Tokens are the output of lexical analysis and the input to syntactic analysis. Each token contains a symbol (its type and value) along with its position in the source code.
Fields§
§sym: Sym<'a>The symbol (type and value) of this token
line: u32Line number where this token appears (1-indexed)
col: u32Column number where this token appears (1-indexed)
Trait Implementations§
impl<'a> Copy for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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