Lines Matching refs:TokenTree
3 use proc_macro::{token_stream, Group, TokenStream, TokenTree};
6 if let Some(TokenTree::Ident(ident)) = it.next() { in try_ident()
14 if let Some(TokenTree::Literal(literal)) = it.next() { in try_literal()
42 if let TokenTree::Punct(punct) = it.next().expect("Reached end of token stream for Punct") { in expect_punct()
60 if let TokenTree::Group(group) = it.next().expect("Reached end of token stream for Group") { in expect_group()
98 pub(crate) decl_generics: Vec<TokenTree>,
102 pub(crate) impl_generics: Vec<TokenTree>,
107 pub(crate) ty_generics: Vec<TokenTree>,
113 pub(crate) fn parse_generics(input: TokenStream) -> (Generics, Vec<TokenTree>) { in parse_generics() argument
129 if nesting == 1 && matches!(&tt, TokenTree::Punct(p) if p.as_char() == '>') { in parse_generics()
136 TokenTree::Punct(p) if p.as_char() == '<' => { in parse_generics()
143 TokenTree::Punct(p) if p.as_char() == '>' => { in parse_generics()
155 TokenTree::Punct(p) if skip_until_comma && p.as_char() == ',' => { in parse_generics()
169 TokenTree::Ident(i) if at_start && i.to_string() == "const" => { in parse_generics()
180 TokenTree::Ident(_) if at_start => { in parse_generics()
185 TokenTree::Punct(p) if p.as_char() == ',' => { in parse_generics()
191 TokenTree::Punct(p) if p.as_char() == '\'' && at_start => { in parse_generics()
196 TokenTree::Punct(p) if p.as_char() == '=' => { in parse_generics()