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

Method match_any_identifier

cranelift/reader/src/parser.rs:928–935  ·  view source on GitHub ↗

Match and consume an identifier.

(&mut self, err_msg: &str)

Source from the content-addressed store, hash-verified

926
927 // Match and consume an identifier.
928 fn match_any_identifier(&mut self, err_msg: &str) -> ParseResult<&'a str> {
929 if let Some(Token::Identifier(text)) = self.token() {
930 self.consume();
931 Ok(text)
932 } else {
933 err!(self.loc, err_msg)
934 }
935 }
936
937 /// Parse an optional source location.
938 ///

Callers 1

Calls 3

OkFunction · 0.85
tokenMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected