Skip to content

Commit ba988cc

Browse files
Update tokenize.cpp
1 parent 9b3b160 commit ba988cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3774,7 +3774,8 @@ void Tokenizer::concatenateNegativeNumberAndAnyPositive()
37743774
if (!tok->tokAt(2) || (tok->tokAt(2)->isOp() && !Token::Match(tok->tokAt(2), "[+-*]")))
37753775
syntaxError(tok);
37763776

3777-
while (tok->str() != ">" && tok->next() && tok->strAt(1) == "+" && (!Token::Match(tok->tokAt(2), "%name% (|;") || Token::Match(tok, "%op%")))
3777+
while ((tok->isArithmeticalOp() || tok->isComparisonOp()) && tok->str() != ">" && tok->next() && tok->strAt(1) == "+" &&
3778+
(!Token::Match(tok->tokAt(2), "%name% (|;") || Token::Match(tok, "%op%")))
37783779
tok->deleteNext();
37793780

37803781
if (Token::Match(tok->next(), "+|- %num%")) {

0 commit comments

Comments
 (0)