TokenCursor in rustc_ast::tokenstream - Rust (original) (raw)

Struct TokenCursor

Source

pub struct TokenCursor {
    pub curr: TokenTreeCursor,
    pub stack: Vec<TokenTreeCursor>,
}

Expand description

A TokenStream cursor that produces Tokens. 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.

§

§

§

§

§

§

§

§

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