Match and consume an identifier.
(&mut self, err_msg: &str)
| 926 | |
| 927 | // Match and consume an identifier. |
| 928 | fn match_any_identifier(&mut self, err_msg: &str) -> ParseResult<&'a str> { |
| 929 | if let Some(Token::Identifier(text)) = self.token() { |
| 930 | self.consume(); |
| 931 | Ok(text) |
| 932 | } else { |
| 933 | err!(self.loc, err_msg) |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | /// Parse an optional source location. |
| 938 | /// |
no test coverage detected