factor out isNumber() in dsnlexer.cpp, add support for numbers with exponents, leave commented out for further testing

This commit is contained in:
Dick Hollenbeck 2013-05-30 20:20:37 -05:00
parent 0eae829b11
commit d8f87cca3c
1 changed files with 2 additions and 2 deletions

View File

@ -415,7 +415,7 @@ static bool isNumber( const char* cp, const char* limit, const char** next )
while( cp<limit && strchr( ".0123456789", *cp ) )
++cp;
if( (cp<limit && isSpace(*cp)) || *cp==')' || *cp=='(' || cp==limit )
if( cp==limit || isSpace( *cp ) || *cp==')' || *cp=='(' )
{
*next = cp;
return true;
@ -469,7 +469,7 @@ static bool isNumber( const char* cp, const char* limit, const char** next )
if( sawNumber )
{
if( ( cp<limit && isSpace(*cp) ) || *cp==')' || *cp=='(' || cp==limit )
if( cp==limit || isSpace( *cp ) || *cp==')' || *cp=='(' )
{
*next = cp;
return true;