Skip to content

Commit

Permalink
syntaxError
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 19, 2024
1 parent 0970028 commit 9d244f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,9 @@ void Tokenizer::simplifyTypedef()
{
// remove typedefs
for (auto &t: typedefs) {
if (!t.second.replaceFailed()) {
if (t.second.replaceFailed()) {
syntaxError(t.second.getTypedefToken());
} else {
const Token* const typedefToken = t.second.getTypedefToken();
TypedefInfo typedefInfo;
typedefInfo.name = t.second.name();
Expand Down

0 comments on commit 9d244f2

Please sign in to comment.