1..19 ok
to
1..20 o k
(yes, the odd space is necessary).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106032
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!isNumberChar(*Pos)) return Pos;
// Otherwise, return to the start of the number.
+ bool HasPeriod = false;
while (Pos > FirstChar && isNumberChar(Pos[-1])) {
+ // Backup over at most one period.
+ if (Pos[-1] == '.') {
+ if (HasPeriod)
+ break;
+ HasPeriod = true;
+ }
+
--Pos;
if (Pos > FirstChar && isSignedChar(Pos[0]) && !isExponentChar(Pos[-1]))
break;