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

Function parse_as_imm32

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

Source from the content-addressed store, hash-verified

3569 #[test]
3570 fn i32_as_hex() {
3571 fn parse_as_imm32(text: &str) -> ParseResult<i32> {
3572 Parser::new(text).match_imm32("unable to parse i32")
3573 }
3574
3575 assert_eq!(parse_as_imm32("0x80000000").unwrap(), -2147483648);
3576 assert_eq!(parse_as_imm32("0xffffffff").unwrap(), -1);

Callers

nothing calls this directly

Calls 2

match_imm32Method · 0.80
newFunction · 0.50

Tested by

no test coverage detected