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

Method match_ieee32

cranelift/reader/src/parser.rs:856–865  ·  view source on GitHub ↗

Match and consume an Ieee32 immediate.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

854
855 // Match and consume an Ieee32 immediate.
856 fn match_ieee32(&mut self, err_msg: &str) -> ParseResult<Ieee32> {
857 if let Some(Token::Float(text)) = self.token() {
858 self.consume();
859 // Lexer just gives us raw text that looks like a float.
860 // Parse it as an Ieee32 to check for the right number of digits and other issues.
861 text.parse().map_err(|e| self.error(e))
862 } else {
863 err!(self.loc, err_msg)
864 }
865 }
866
867 // Match and consume an Ieee64 immediate.
868 fn match_ieee64(&mut self, err_msg: &str) -> ParseResult<Ieee64> {

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