Skip to content

Commit

Permalink
fix #6640
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 7, 2013
1 parent 22cb38b commit eeebf5b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/qgsexpressionlexer.ll
Expand Up @@ -155,7 +155,18 @@ string "'"{str_char}*"'"
"," { return COMMA; }
{num_float} { exp_lval.numberFloat = cLocale.toDouble( QString::fromAscii(yytext) ); return NUMBER_FLOAT; }
{num_int} { exp_lval.numberInt = cLocale.toInt( QString::fromAscii(yytext), 0, 10); return NUMBER_INT; }
{num_int} {
bool ok;
exp_lval.numberInt = cLocale.toInt( QString::fromAscii(yytext), &ok, 10 );
if( ok )
return NUMBER_INT;
exp_lval.numberFloat = cLocale.toDouble( QString::fromAscii(yytext), &ok );
if( ok )
return NUMBER_FLOAT;
return Unknown_CHARACTER;
}
{string} { TEXT_FILTER(stripText); return STRING; }
Expand Down

0 comments on commit eeebf5b

Please sign in to comment.