Lines Matching refs:it
5 pub(crate) fn try_ident(it: &mut token_stream::IntoIter) -> Option<String> {
6 if let Some(TokenTree::Ident(ident)) = it.next() {
13 pub(crate) fn try_literal(it: &mut token_stream::IntoIter) -> Option<String> {
14 if let Some(TokenTree::Literal(literal)) = it.next() {
21 pub(crate) fn try_string(it: &mut token_stream::IntoIter) -> Option<String> {
22 try_literal(it).and_then(|string| {
37 pub(crate) fn expect_ident(it: &mut token_stream::IntoIter) -> String {
38 try_ident(it).expect("Expected Ident")
41 pub(crate) fn expect_punct(it: &mut token_stream::IntoIter) -> char {
42 if let TokenTree::Punct(punct) = it.next().expect("Reached end of token stream for Punct") {
49 pub(crate) fn expect_string(it: &mut token_stream::IntoIter) -> String {
50 try_string(it).expect("Expected string")
53 pub(crate) fn expect_string_ascii(it: &mut token_stream::IntoIter) -> String {
54 let string = try_string(it).expect("Expected string");
59 pub(crate) fn expect_group(it: &mut token_stream::IntoIter) -> Group {
60 if let TokenTree::Group(group) = it.next().expect("Reached end of token stream for Group") {
67 pub(crate) fn expect_end(it: &mut token_stream::IntoIter) {
68 if it.next().is_some() {
103 // This is a parsing error, so we just end it here.
119 // Here depending on the token, it might be a generic variable name.
125 // We also already push the `,` token, this makes it easier to append