Struct rustc_parse::parser::TokenCursor
source · struct TokenCursor {
tree_cursor: TokenTreeCursor,
stack: Vec<(TokenTreeCursor, DelimSpan, DelimSpacing, Delimiter)>,
}
Expand description
Iterator over a TokenStream
that produces Token
s. It’s a bit odd that
we (a) lex tokens into a nice tree structure (TokenStream
), and then (b)
use this type to emit them as a linear sequence. But a linear sequence is
what the parser expects, for the most part.
Fields§
§tree_cursor: TokenTreeCursor
§stack: Vec<(TokenTreeCursor, DelimSpan, DelimSpacing, Delimiter)>
Implementations§
Trait Implementations§
source§impl Clone for TokenCursor
impl Clone for TokenCursor
source§fn clone(&self) -> TokenCursor
fn clone(&self) -> TokenCursor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl DynSend for TokenCursor
impl DynSync for TokenCursor
impl Freeze for TokenCursor
impl !RefUnwindSafe for TokenCursor
impl !Send for TokenCursor
impl !Sync for TokenCursor
impl Unpin for TokenCursor
impl !UnwindSafe for TokenCursor
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
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Filterable for T
impl<T> Filterable for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 40 bytes