Skip to content

Commit 04e518d

Browse files
Update tokenize.cpp
1 parent e00e1f2 commit 04e518d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8960,8 +8960,10 @@ void Tokenizer::findGarbageCode() const
89608960
// count number of semicolons
89618961
int semicolons = 0, colons = 0;
89628962
const Token* const endTok = tok->linkAt(1);
8963-
for (tok = tok->tokAt(2); tok && tok != endTok; tok = tok->next()) {
8963+
for (tok = tok->tokAt(2); tok != endTok; tok = tok->next()) {
89648964
if (const Token* lam = findLambdaEndTokenWithoutAST(tok)) {
8965+
if (lam == endTok)
8966+
break;
89658967
tok = lam;
89668968
continue;
89678969
}

0 commit comments

Comments
 (0)