pub struct Token {
pub kind: i32,
pub value: TokenValue,
}Expand description
A single lexed token with its semantic payload.
kind is an i32 whose value is either an ASCII byte code (for single-byte
tokens like +, -, [) or one of the TK_* constants (for reserved
words, multi-char symbols, and literals).
TODO(port): Phase B — replace kind: i32 with a proper TokenKind enum
covering both single-byte and named tokens (e.g. TokenKind::Char(u8) +
named variants).
Fields§
§kind: i32§value: TokenValueImplementations§
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