> ...but misinterprets hex literals ("0x...") and other leading-number strings 

Do you mean HexIntegerLiteral or a string that looks like a HexIntegerLiteral? (ie. `0x1` vs `"0x1"`)