| 2704 | } |
| 2705 | |
| 2706 | static bool validTokenEnd(bool bounded, const Token *tok, const Token *backToken, int offset) |
| 2707 | { |
| 2708 | if (!bounded) |
| 2709 | return true; |
| 2710 | |
| 2711 | while (tok && offset >= 0) { |
| 2712 | if (tok == backToken) |
| 2713 | return false; |
| 2714 | --offset; |
| 2715 | tok = tok->next(); |
| 2716 | } |
| 2717 | |
| 2718 | return tok && offset < 0; |
| 2719 | } |
| 2720 | |
| 2721 | // TODO: This is not the correct class for simplifyCalculations(), so it |
| 2722 | // should be moved away. |
no test coverage detected