pub struct Token {
pub kind: TokenKind,
pub span: Span,
pub newline_before: bool,
}Expand description
A token plus where it came from.
Fields§
§kind: TokenKindToken payload.
span: SpanSource range of the token.
newline_before: boolWhether a line terminator appeared between the previous token and this one (drives Automatic Semicolon Insertion and restricted productions).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Forget for Token
impl Freeze for Token
impl Move for Token
impl RefUnwindSafe for Token
impl Send for Tokenwhere
RawVecInner: Send,
impl Sync for Tokenwhere
RawVecInner: Sync,
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Tokenwhere
RawVecInner: UnwindSafe,
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