pub struct Token {
pub token_type: Tokentype,
pub lexeme: String,
pub pos: usize,
}
Expand description
Represents a token in the source code
Fields§
§token_type: Tokentype
The type of the token
lexeme: String
The actual text of the token
pos: usize
Position index - used with LineInfo to determine line number
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