does the given stream contain this operator?
(&self, stream: &VecDeque<TokenTree>, operator: &str, offset: usize)
| 446 | } |
| 447 | /// does the given stream contain this operator? |
| 448 | fn peek_operator_stream_offset(&self, stream: &VecDeque<TokenTree>, operator: &str, offset: usize) -> bool { |
| 449 | for (i, c) in operator.char_indices() { |
| 450 | if let Some(TokenTree::Punct(punct)) = stream.get(i + offset) { |
| 451 | if punct.as_char() != c { |
| 452 | return false; |
| 453 | } |
| 454 | } else { |
| 455 | return false; |
| 456 | } |
| 457 | } |
| 458 | true |
| 459 | } |
| 460 | /// does the input start with this keyword? |
| 461 | fn peek_keyword(&self, keyword: &str) -> bool { |
| 462 | if let Some(TokenTree::Ident(ident)) = self.tokens.front() { |
no outgoing calls
no test coverage detected