pub trait TokenStreamExt {
    // Required methods
    fn push(&mut self, token: TokenTree);
    fn parser(self) -> TokenParser<IntoIter> ;
}
Available on crate feature proc-macro only.
Expand description

Generic extensions for proc_macro::TokenStream

Required Methods§

source

fn push(&mut self, token: TokenTree)

Pushes a single TokenTree onto the token stream

source

fn parser(self) -> TokenParser<IntoIter>

Available on crate feature parser only.

Creates a TokenParser from this token stream

Implementations on Foreign Types§

source§

impl TokenStreamExt for TokenStream

source§

fn push(&mut self, token: TokenTree)

Pushes a single TokenTree onto the token stream

source§

fn parser(self) -> TokenParser<IntoIter>

Available on crate feature parser only.

Creates a TokenParser from this token stream

Implementors§