Message ID | mcripg7j005.fsf@dhcp-172-18-216-180.mtv.corp.google.com |
---|---|
State | New |
Headers | show |
diff -r 8671bcd0c298 go/lex.cc --- a/go/lex.cc Mon May 07 11:35:33 2012 -0700 +++ b/go/lex.cc Mon May 07 11:50:46 2012 -0700 @@ -1012,7 +1012,9 @@ } } - 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;