Lines Matching refs:TokenTree
4 use proc_macro::{Delimiter, Ident, Span, TokenStream, TokenTree};
31 Some(TokenTree::Group(group)) if group.delimiter() == Brace => { in parse_export()
59 Some(TokenTree::Punct(punct)) if punct.as_char() == ch => { in parse_punct()
64 tt.map_or_else(Span::call_site, TokenTree::span), in parse_punct()
90 Some(TokenTree::Ident(ident)) if ident.to_string() == "as" => { in parse_macro()
101 Some(TokenTree::Ident(ident)) => Ok(ident), in parse_ident()
103 tt.as_ref().map_or_else(Span::call_site, TokenTree::span), in parse_ident()
111 Some(TokenTree::Ident(ident)) if ident.to_string() == kw => Ok(()), in parse_keyword()
113 tt.as_ref().map_or_else(Span::call_site, TokenTree::span), in parse_keyword()
121 Some(TokenTree::Literal(lit)) => lit.to_string().parse().map_err(|_| lit.span()), in parse_int()
129 Some(TokenTree::Group(group)) if group.delimiter() == delimiter => { in parse_group()
133 tt.as_ref().map_or_else(Span::call_site, TokenTree::span), in parse_group()
140 if let Some(TokenTree::Ident(ident)) = tokens.peek() { in parse_visibility()
143 TokenTree::Ident(vis) => return Ok(Some(vis)), in parse_visibility()
153 while let Some(TokenTree::Punct(punct)) = tokens.peek() { in parse_attributes()
160 Some(TokenTree::Group(group)) if group.delimiter() == Bracket => { in parse_attributes()
179 TokenTree::Ident(ident) if ident.to_string() == "support_nested" => { in parse_export_args()
182 TokenTree::Ident(ident) if ident.to_string() == "internal_macro_calls" => { in parse_export_args()
189 TokenTree::Ident(ident) if ident.to_string() == "fake_call_site" => { in parse_export_args()
192 TokenTree::Ident(ident) if ident.to_string() == "only_hack_old_rustc" => { in parse_export_args()