The lexer used to incorrectly accept a token like 0x123i
and interpreted it as 123i. It also used to die when encountering
0xdie.
From-SVN: r187266
}
}
- if (*p != '.' && *p != 'i' && !Lex::could_be_exponent(p, pend))
+ // A partial token that looks like an octal literal might actually be the
+ // beginning of a floating-point or imaginary literal.
+ if (base == 16 || (*p != '.' && *p != 'i' && !Lex::could_be_exponent(p, pend)))
{
std::string s(pnum, p - pnum);
mpz_t val;