Lines Matching refs:TokenTree
4 use crate::{fallback, Delimiter, Punct, Spacing, TokenTree};
19 // In `impl Extend<TokenTree> for TokenStream` which is used heavily by quote,
25 extra: Vec<proc_macro::TokenTree>,
159 fn into_compiler_token(token: TokenTree) -> proc_macro::TokenTree {
161 TokenTree::Group(tt) => tt.inner.unwrap_nightly().into(),
162 TokenTree::Punct(tt) => {
171 TokenTree::Ident(tt) => tt.inner.unwrap_nightly().into(),
172 TokenTree::Literal(tt) => tt.inner.unwrap_nightly().into(),
176 impl From<TokenTree> for TokenStream {
177 fn from(token: TokenTree) -> Self {
186 impl FromIterator<TokenTree> for TokenStream {
187 fn from_iter<I: IntoIterator<Item = TokenTree>>(trees: I) -> Self {
222 impl Extend<TokenTree> for TokenStream {
223 fn extend<I: IntoIterator<Item = TokenTree>>(&mut self, stream: I) {
314 type Item = TokenTree;
328 type Item = TokenTree;
330 fn next(&mut self) -> Option<TokenTree> {
336 proc_macro::TokenTree::Group(tt) => crate::Group::_new(Group::Compiler(tt)).into(),
337 proc_macro::TokenTree::Punct(tt) => {
346 proc_macro::TokenTree::Ident(s) => crate::Ident::_new(Ident::Compiler(s)).into(),
347 proc_macro::TokenTree::Literal(l) => crate::Literal::_new(Literal::Compiler(l)).into(),