MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / match_ieee128

Method match_ieee128

cranelift/reader/src/parser.rs:880–889  ·  view source on GitHub ↗

Match and consume an Ieee128 immediate.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

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> {

Callers 2

parse_data_valueMethod · 0.80
parse_inst_operandsMethod · 0.80

Calls 4

tokenMethod · 0.80
consumeMethod · 0.45
parseMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected