Struct rustc_parse::parser::TokenCursor
source · struct TokenCursor {
tree_cursor: TokenTreeCursor,
stack: Vec<(TokenTreeCursor, Delimiter, DelimSpan)>,
}
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, Delimiter, DelimSpan)>
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 !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
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