Tokenizer: Use %op% in simplifyCalculations

This commit is contained in:
Daniel Marjamäki 2011-04-10 11:22:00 +02:00
parent af60f2c4ef
commit f179df1f10
1 changed files with 3 additions and 3 deletions

View File

@ -7349,12 +7349,12 @@ bool Tokenizer::simplifyCalculations()
else if (tok->next() && tok->next()->isNumber())
{
// (1-2)
while (Token::Match(tok, "[[,(=<>+-*|&^] %num% [+-*/] %num% [],);=<>+-*/|&^]") ||
Token::Match(tok, "<< %num% [+-*/] %num% [],);=<>+-*/|&^]") ||
while (Token::Match(tok, "[[,(=<>+-*|&^] %num% [+-*/] %num% ]|,|)|;|=|%op%") ||
Token::Match(tok, "<< %num% [+-*/] %num% ]|,|)|;|=|%op%") ||
Token::Match(tok, "[[,(=<>+-*|&^] %num% [+-*/] %num% <<|>>") ||
Token::Match(tok, "<< %num% [+-*/] %num% <<") ||
Token::Match(tok, "[(,[] %num% [|&^] %num% [];,);]") ||
Token::Match(tok, "(|==|!=|<=|>=|<|>|+|-|* %num% [+-*/] %num% ==|!=|<=|>=|<|>|)"))
Token::Match(tok, "(|%op% %num% [+-*/] %num% )|%op%"))
{
tok = tok->next();