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

Method match_ieee16

cranelift/reader/src/parser.rs:844–853  ·  view source on GitHub ↗

Match and consume an Ieee16 immediate.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

842
843 // Match and consume an Ieee16 immediate.
844 fn match_ieee16(&mut self, err_msg: &str) -> ParseResult<Ieee16> {
845 if let Some(Token::Float(text)) = self.token() {
846 self.consume();
847 // Lexer just gives us raw text that looks like a float.
848 // Parse it as an Ieee16 to check for the right number of digits and other issues.
849 text.parse().map_err(|e| self.error(e))
850 } else {
851 err!(self.loc, err_msg)
852 }
853 }
854
855 // Match and consume an Ieee32 immediate.
856 fn match_ieee32(&mut self, err_msg: &str) -> ParseResult<Ieee32> {

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