Skip to content

Commit df9c4de

Browse files
Update tokenize.cpp
1 parent 4910a03 commit df9c4de

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8839,6 +8839,8 @@ void Tokenizer::findGarbageCode() const
88398839
if (tok->str() == ";") { // do the counting
88408840
semicolons++;
88418841
} else if (tok->str() == ":") {
8842+
if (tok->strAt(-1) == ",")
8843+
syntaxError(tok);
88428844
colons++;
88438845
} else if (tok->str() == "(") { // skip pairs of ( )
88448846
tok = tok->link();

0 commit comments

Comments
 (0)