Disallow hexadecimal literals in type declarations
Existing IR syntax is ambiguous in type declarations in presence of zero sizes. In particular, `0x1` in the type size can be interpreted as either a hexadecimal literal corresponding to 1, or as two distinct decimal literals separated by an `x` for sizes. Furthermore, the shape `<0xi32>` fails lexing because it is expected to be an integer literal. Fix the lexer to treat `0xi32` as an integer literal `0` followed by a bare identifier `xi32` (look one character ahead and early return instead of erroring out). Disallow hexadecimal literals in type declarations and forcibly split the token into multiple parts while parsing the type. Note that the splitting trick has been already present to separate the element type from the preceding `x` character. PiperOrigin-RevId: 232880373
Loading
Please sign in to comment