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

Function parse_as_uimm8

cranelift/reader/src/parser.rs:3538–3540  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

3536 #[test]
3537 fn u8_as_hex() {
3538 fn parse_as_uimm8(text: &str) -> ParseResult<u8> {
3539 Parser::new(text).match_uimm8("unable to parse u8")
3540 }
3541
3542 assert_eq!(parse_as_uimm8("0").unwrap(), 0);
3543 assert_eq!(parse_as_uimm8("0xff").unwrap(), 255);

Callers

nothing calls this directly

Calls 2

match_uimm8Method · 0.80
newFunction · 0.50

Tested by

no test coverage detected