| 918 | } |
| 919 | |
| 920 | static Token* skipTo(Token* tok, const Token* dest, const Token* end = nullptr) { |
| 921 | if (end && dest->index() > end->index()) |
| 922 | return nullptr; |
| 923 | const int i = dest->index() - tok->index(); |
| 924 | if (i > 0) |
| 925 | return tok->tokAt(dest->index() - tok->index()); |
| 926 | return nullptr; |
| 927 | } |
| 928 | |
| 929 | static Token* getStepTokFromEnd(Token* tok) { |
| 930 | if (!Token::simpleMatch(tok, "}")) |