Skip to content

Commit 36e207a

Browse files
Update tokenlist.cpp
1 parent b6e1f45 commit 36e207a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/tokenlist.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,9 +2029,9 @@ void TokenList::validateAst(bool print) const
20292029
"' doesn't have two operands.",
20302030
InternalError::AST);
20312031
}
2032-
if (tok->str() == "case" && !tok->astOperand1()) {
2032+
if (!tok->astOperand1() && Token::Match(tok, "case|!")) {
20332033
throw InternalError(tok,
2034-
"Syntax Error: AST broken, 'case' doesn't have an operand.",
2034+
"Syntax Error: AST broken, '" + tok->str() + "' doesn't have an operand.",
20352035
InternalError::AST);
20362036
}
20372037

0 commit comments

Comments
 (0)