Loading common/dsnlexer.cpp +8 −4 Original line number Original line Diff line number Diff line Loading @@ -407,7 +407,7 @@ static bool isSpace( int cc ) */ */ static bool isNumber( const char* cp, const char* limit, const char** next ) static bool isNumber( const char* cp, const char* limit, const char** next ) { { #if 1 // no exponents supported #if 0 // no exponents supported if( strchr( "+-.0123456789", *cp ) ) if( strchr( "+-.0123456789", *cp ) ) { { Loading Loading @@ -440,16 +440,19 @@ static bool isNumber( const char* cp, const char* limit, const char** next ) sawNumber = true; sawNumber = true; } } { if( cp < limit && *cp == '.' ) if( cp < limit && *cp == '.' ) { ++cp; ++cp; while( cp < limit && strchr( "0123456789", *cp ) ) while( cp < limit && strchr( "0123456789", *cp ) ) { { sawNumber = true; ++cp; ++cp; sawNumber = true; } } } if( sawNumber ) { if( cp < limit && strchr( "Ee", *cp ) ) if( cp < limit && strchr( "Ee", *cp ) ) { { ++cp; ++cp; Loading @@ -469,6 +472,7 @@ static bool isNumber( const char* cp, const char* limit, const char** next ) if( sawNumber ) if( sawNumber ) { { // token can only be a number if not adjoined with other non-number token text if( cp==limit || isSpace( *cp ) || *cp==')' || *cp=='(' ) if( cp==limit || isSpace( *cp ) || *cp==')' || *cp=='(' ) { { *next = cp; *next = cp; Loading Loading
common/dsnlexer.cpp +8 −4 Original line number Original line Diff line number Diff line Loading @@ -407,7 +407,7 @@ static bool isSpace( int cc ) */ */ static bool isNumber( const char* cp, const char* limit, const char** next ) static bool isNumber( const char* cp, const char* limit, const char** next ) { { #if 1 // no exponents supported #if 0 // no exponents supported if( strchr( "+-.0123456789", *cp ) ) if( strchr( "+-.0123456789", *cp ) ) { { Loading Loading @@ -440,16 +440,19 @@ static bool isNumber( const char* cp, const char* limit, const char** next ) sawNumber = true; sawNumber = true; } } { if( cp < limit && *cp == '.' ) if( cp < limit && *cp == '.' ) { ++cp; ++cp; while( cp < limit && strchr( "0123456789", *cp ) ) while( cp < limit && strchr( "0123456789", *cp ) ) { { sawNumber = true; ++cp; ++cp; sawNumber = true; } } } if( sawNumber ) { if( cp < limit && strchr( "Ee", *cp ) ) if( cp < limit && strchr( "Ee", *cp ) ) { { ++cp; ++cp; Loading @@ -469,6 +472,7 @@ static bool isNumber( const char* cp, const char* limit, const char** next ) if( sawNumber ) if( sawNumber ) { { // token can only be a number if not adjoined with other non-number token text if( cp==limit || isSpace( *cp ) || *cp==')' || *cp=='(' ) if( cp==limit || isSpace( *cp ) || *cp==')' || *cp=='(' ) { { *next = cp; *next = cp; Loading