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

Method match_dt

cranelift/reader/src/parser.rs:595–603  ·  view source on GitHub ↗

Match and consume a dynamic type reference.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

593
594 // Match and consume a dynamic type reference.
595 fn match_dt(&mut self, err_msg: &str) -> ParseResult<DynamicType> {
596 if let Some(Token::DynamicType(dt)) = self.token() {
597 self.consume();
598 if let Some(dt) = DynamicType::with_number(dt) {
599 return Ok(dt);
600 }
601 }
602 err!(self.loc, err_msg)
603 }
604
605 // Extract Type from DynamicType
606 fn concrete_from_dt(&mut self, dt: DynamicType, ctx: &mut Context) -> Option<Type> {

Callers 3

parse_instructionMethod · 0.80

Calls 3

OkFunction · 0.85
tokenMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected