Return whether tok is the "{" that starts an enumerator list */
| 79 | |
| 80 | /** Return whether tok is the "{" that starts an enumerator list */ |
| 81 | static bool isEnumStart(const Token* tok) |
| 82 | { |
| 83 | if (!Token::simpleMatch(tok, "{")) |
| 84 | return false; |
| 85 | tok = tok->previous(); |
| 86 | while (tok && (!tok->isKeyword() || Token::isStandardType(tok->str())) && Token::Match(tok, "%name%|::|:")) |
| 87 | tok = tok->previous(); |
| 88 | if (Token::simpleMatch(tok, "class")) |
| 89 | tok = tok->previous(); |
| 90 | return Token::simpleMatch(tok, "enum"); |
| 91 | } |
| 92 | |
| 93 | template<typename T> |
| 94 | static void skipEnumBody(T *&tok) |
no test coverage detected