pub struct Token {
pub kind: TokenKind,
pub range: SourceRange,
pub origin: Origin,
}Expand description
A preprocessed C token: what the parser consumes.
Deliberately shaped like lex::Token minus the flags the preprocessor
needed and plus the Origin it produced, so that the parser’s view of a
token did not have to change.
Fields§
§kind: TokenKindWhat the token is.
range: SourceRangeWhere to blame: the token’s own range, or the range of the macro invocation it came out of.
origin: OriginHow the token got here.
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