Match and consume an Ieee128 immediate.
(&mut self, err_msg: &str)
| 878 | |
| 879 | // Match and consume an Ieee128 immediate. |
| 880 | fn match_ieee128(&mut self, err_msg: &str) -> ParseResult<Ieee128> { |
| 881 | if let Some(Token::Float(text)) = self.token() { |
| 882 | self.consume(); |
| 883 | // Lexer just gives us raw text that looks like a float. |
| 884 | // Parse it as an Ieee128 to check for the right number of digits and other issues. |
| 885 | text.parse().map_err(|e| self.error(e)) |
| 886 | } else { |
| 887 | err!(self.loc, err_msg) |
| 888 | } |
| 889 | } |
| 890 | |
| 891 | // Match and consume an enumerated immediate, like one of the condition codes. |
| 892 | fn match_enum<T: FromStr>(&mut self, err_msg: &str) -> ParseResult<T> { |
no test coverage detected