Struct rustc_parse::parser::TokenCursor
source · struct TokenCursor {
frame: TokenCursorFrame,
stack: Vec<TokenCursorFrame>,
desugar_doc_comments: bool,
num_next_calls: usize,
break_last_token: bool,
}
Fields
frame: TokenCursorFrame
stack: Vec<TokenCursorFrame>
desugar_doc_comments: bool
num_next_calls: usize
break_last_token: bool
Implementations
sourceimpl TokenCursor
impl TokenCursor
fn next(&mut self, desugar_doc_comments: bool) -> (Token, Spacing)
sourcefn inlined_next(&mut self, desugar_doc_comments: bool) -> (Token, Spacing)
fn inlined_next(&mut self, desugar_doc_comments: bool) -> (Token, Spacing)
This always-inlined version should only be used on hot code paths.
fn desugar(
&mut self,
attr_style: AttrStyle,
data: Symbol,
span: Span
) -> (Token, Spacing)
Trait Implementations
sourceimpl Clone for TokenCursor
impl Clone for TokenCursor
sourcefn clone(&self) -> TokenCursor
fn clone(&self) -> TokenCursor
Returns a copy of the value. Read more
1.0.0 · sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn 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: 80 bytes