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

Function parse_as_imm16

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

Source from the content-addressed store, hash-verified

3548 #[test]
3549 fn i16_as_hex() {
3550 fn parse_as_imm16(text: &str) -> ParseResult<i16> {
3551 Parser::new(text).match_imm16("unable to parse i16")
3552 }
3553
3554 assert_eq!(parse_as_imm16("0x8000").unwrap(), -32768);
3555 assert_eq!(parse_as_imm16("0xffff").unwrap(), -1);

Callers

nothing calls this directly

Calls 2

match_imm16Method · 0.80
newFunction · 0.50

Tested by

no test coverage detected