Match and consume an Ieee64 immediate.
(&mut self, err_msg: &str)
| 866 | |
| 867 | // Match and consume an Ieee64 immediate. |
| 868 | fn match_ieee64(&mut self, err_msg: &str) -> ParseResult<Ieee64> { |
| 869 | if let Some(Token::Float(text)) = self.token() { |
| 870 | self.consume(); |
| 871 | // Lexer just gives us raw text that looks like a float. |
| 872 | // Parse it as an Ieee64 to check for the right number of digits and other issues. |
| 873 | text.parse().map_err(|e| self.error(e)) |
| 874 | } else { |
| 875 | err!(self.loc, err_msg) |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | // Match and consume an Ieee128 immediate. |
| 880 | fn match_ieee128(&mut self, err_msg: &str) -> ParseResult<Ieee128> { |
no test coverage detected