| 1480 | } |
| 1481 | |
| 1482 | static const Token* goToRightParenthesis(const Token* start, const Token* end) |
| 1483 | { |
| 1484 | // move end to rpar in such expression: '2>(x+1)' |
| 1485 | int par = 0; |
| 1486 | for (const Token *tok = end; tok && tok != start; tok = tok->previous()) { |
| 1487 | if (tok->str() == ")") |
| 1488 | ++par; |
| 1489 | else if (tok->str() == "(") { |
| 1490 | if (par == 0) |
| 1491 | end = tok->link(); |
| 1492 | else |
| 1493 | --par; |
| 1494 | } |
| 1495 | } |
| 1496 | return end; |
| 1497 | } |
| 1498 | |
| 1499 | std::pair<const Token *, const Token *> Token::findExpressionStartEndTokens() const |
| 1500 | { |
no test coverage detected