| 1463 | } |
| 1464 | |
| 1465 | static const Token* goToLeftParenthesis(const Token* start, const Token* end) |
| 1466 | { |
| 1467 | // move start to lpar in such expression: '(*it).x' |
| 1468 | int par = 0; |
| 1469 | for (const Token *tok = start; tok && tok != end; tok = tok->next()) { |
| 1470 | if (tok->str() == "(") |
| 1471 | ++par; |
| 1472 | else if (tok->str() == ")") { |
| 1473 | if (par == 0) |
| 1474 | start = tok->link(); |
| 1475 | else |
| 1476 | --par; |
| 1477 | } |
| 1478 | } |
| 1479 | return start; |
| 1480 | } |
| 1481 | |
| 1482 | static const Token* goToRightParenthesis(const Token* start, const Token* end) |
| 1483 | { |
no test coverage detected