Fix bug, add support for +/-

llvm-svn: 12934
This commit is contained in:
Chris Lattner 2004-04-13 21:48:43 +00:00
parent 8662beeecd
commit ed94fef7e3
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ static bool isNumberChar(char C) {
switch (C) {
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case '.':
case '.': case '+': case '-':
case 'e':
case 'E': return true;
default: return false;
@ -64,7 +64,7 @@ static bool isNumberChar(char C) {
}
static char *BackupNumber(char *Pos, char *FirstChar) {
while (Pos < FirstChar && isNumberChar(Pos[-1]))
while (Pos > FirstChar && isNumberChar(Pos[-1]))
--Pos;
return Pos;
}