Struct rustc_ast::tokenstream::TokenStream [−][src]
pub struct TokenStream(pub(crate) Lrc<Vec<TreeAndSpacing>>);
Expand description
A TokenStream is an abstract sequence of tokens, organized into TokenTrees.
The goal is for procedural macros to work with TokenStreams and TokenTrees
instead of a representation of the abstract syntax tree.
Today’s TokenTrees can still contain AST via token::Interpolated for
backwards compatibility.
Implementations
pub fn into_trees(self) -> CursorⓘCompares two TokenStreams, checking equality without regarding span information.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
Creates a value from an iterator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for TokenStreamimpl !Send for TokenStreamimpl !Sync for TokenStreamimpl Unpin for TokenStreamimpl !UnwindSafe for TokenStreamBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 8 bytes