Skip to content

Commit

Permalink
syntaxError
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Mar 12, 2024
1 parent 25c562d commit bef8765
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8401,6 +8401,9 @@ void Tokenizer::findGarbageCode() const
else if (Token::Match(tok, "%assign% [") && Token::simpleMatch(tok->linkAt(1), "] ;"))
syntaxError(tok, tok->str() + "[...];");

else if (Token::Match(tok, "[({<] %assign%"))
syntaxError(tok);

// UNKNOWN_MACRO(return)
if (tok->isKeyword() && Token::Match(tok, "throw|return )") && Token::Match(tok->linkAt(1)->previous(), "%name% ("))
unknownMacroError(tok->linkAt(1)->previous());
Expand Down

0 comments on commit bef8765

Please sign in to comment.