Tokenizer: Use %op% in simplifyCalculations
This commit is contained in:
parent
af60f2c4ef
commit
f179df1f10
|
@ -7349,12 +7349,12 @@ bool Tokenizer::simplifyCalculations()
|
||||||
else if (tok->next() && tok->next()->isNumber())
|
else if (tok->next() && tok->next()->isNumber())
|
||||||
{
|
{
|
||||||
// (1-2)
|
// (1-2)
|
||||||
while (Token::Match(tok, "[[,(=<>+-*|&^] %num% [+-*/] %num% [],);=<>+-*/|&^]") ||
|
while (Token::Match(tok, "[[,(=<>+-*|&^] %num% [+-*/] %num% ]|,|)|;|=|%op%") ||
|
||||||
Token::Match(tok, "<< %num% [+-*/] %num% [],);=<>+-*/|&^]") ||
|
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, "[(,[] %num% [|&^] %num% [];,);]") ||
|
Token::Match(tok, "[(,[] %num% [|&^] %num% [];,);]") ||
|
||||||
Token::Match(tok, "(|==|!=|<=|>=|<|>|+|-|* %num% [+-*/] %num% ==|!=|<=|>=|<|>|)"))
|
Token::Match(tok, "(|%op% %num% [+-*/] %num% )|%op%"))
|
||||||
{
|
{
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue