mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Fix bug, add support for +/-
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c78c0e4c06
commit
6de6a0a6f0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user