pub struct Token {
pub token_type: TokenType,
pub value: String,
pub literal: Literal,
}Expand description
A single lexical token. value is the raw source text; literal is the
parsed payload (or None). No position field — the 4-language token contract
excludes positions, matching the shared fixture’s token shape.
Fields§
§token_type: TokenTypeThe token kind.
value: StringRaw source text for this token.
literal: LiteralParsed literal payload, if any.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Token
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