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

Method match_fn

cranelift/reader/src/parser.rs:622–630  ·  view source on GitHub ↗

Match and consume a function reference.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

620
621 // Match and consume a function reference.
622 fn match_fn(&mut self, err_msg: &str) -> ParseResult<FuncRef> {
623 if let Some(Token::FuncRef(fnref)) = self.token() {
624 self.consume();
625 if let Some(fnref) = FuncRef::with_number(fnref) {
626 return Ok(fnref);
627 }
628 }
629 err!(self.loc, err_msg)
630 }
631
632 // Match and consume a signature reference.
633 fn match_sig(&mut self, err_msg: &str) -> ParseResult<SigRef> {

Callers 2

parse_function_declMethod · 0.80
parse_inst_operandsMethod · 0.80

Calls 3

OkFunction · 0.85
tokenMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected