Problem
A match arm whose integer pattern is written in hex, binary or octal, or with a type suffix, makes the parser drop the whole match statement without reporting an error:
fn main() {
print("before")
let x = 255
match x {
0xFF => print("ff"),
_ => print("other"),
}
print("after")
}home run never prints ff, and home ast / home check report zero parse errors. With 255 => the program prints before, ff, after. The same happens for 0b101 =>, 0o17 =>, 7u8 =>, -0x10 =>, 0x30..=0x39 => and 1.5f32 =>. partition_type_from_code in packages/drivers/src/bindings/storage.home uses this form.
parsePattern parses integer pattern tokens with std.fmt.parseInt(i64, lexeme, 10) and float pattern tokens with a raw parseFloat, so these spellings fail with InvalidCharacter. The error is never passed to reportError, and the recovery in blockStatement / parse discards the statement.
Fix
parsePattern now strips _ separators and the type suffix from integer and float pattern tokens, as integer and float expressions already do, and parses integers with base 0 so 0x/0b/0o prefixes work. A literal that still does not parse (for example 0xFFFFFFFFFFFFFFFF =>, which overflows the i64 pattern value) now reports "Invalid integer literal in pattern" (or "Invalid float literal in pattern") instead of silently dropping the statement.
Tests
Two new tests in packages/parser/tests/parser_test.zig. parser: match statement numeric patterns accept hex, binary, octal and type suffixes fails on main with expected 1, found 0 (the program has no statements and no errors). parser: match statement reports numeric patterns that do not parse (0xFFFFFFFFFFFFFFFF =>, 1.0e+ =>) fails on main because no error is recorded. Both pass with this change.
GitHub Actions does not run on this repo at the moment, so I ran the suites on Linux x86_64 with the pinned Zig 0.17.0-dev.2163, on main (cde9c31) and on this branch. zig build test --summary all: 9149/9160 passed on main, 9151/9162 on this branch; both runs have the same 3 failing tests, 8 skips and 21 failed build steps. The diagnostic snapshot harness gives identical output on both (70 of 95 cases pass on main). Running the example above with the built home: main prints after, before and home ast shows no match; this branch prints before, ff, after.