Correctly parse binary operations that can be interpreted as sign prefixes for numbers

This commit is contained in:
Jan
2021-11-28 15:16:43 +01:00
parent c3a44f60d3
commit e7eb43a955
12 changed files with 211 additions and 12 deletions

View File

@ -119,10 +119,11 @@ CommandsParserValue CommandsLexer::GetNextToken()
if (isdigit(c))
{
bool isFloatingPointValue;
bool hasSignPrefix;
double doubleValue;
int integerValue;
ReadNumber(isFloatingPointValue, doubleValue, integerValue);
ReadNumber(isFloatingPointValue, hasSignPrefix, doubleValue, integerValue);
if (isFloatingPointValue)
return CommandsParserValue::FloatingPoint(pos, doubleValue);

View File

@ -138,10 +138,11 @@ HeaderParserValue HeaderLexer::GetNextToken()
if(isdigit(c))
{
bool isFloatingPointValue;
bool hasSignPrefix;
double doubleValue;
int integerValue;
ReadNumber(isFloatingPointValue, doubleValue, integerValue);
ReadNumber(isFloatingPointValue, hasSignPrefix, doubleValue, integerValue);
if (isFloatingPointValue)
return HeaderParserValue::FloatingPoint(pos, doubleValue);