From 941a03814a5f8f7be93425f71ee65a4222d16899 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 10 Jun 2009 12:28:10 +0200 Subject: don't let comments weaved into strings confuse us Reviewed-by: TrustMe Task-number: 254260 Testcase: 323072@p4 --- tools/linguist/shared/cpp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/linguist/shared/cpp.cpp b/tools/linguist/shared/cpp.cpp index 0aab661..541543f 100644 --- a/tools/linguist/shared/cpp.cpp +++ b/tools/linguist/shared/cpp.cpp @@ -480,7 +480,9 @@ static bool matchString(QString *s) s->clear(); while (yyTok == Tok_String) { *s += yyString; - yyTok = getToken(); + do { + yyTok = getToken(); + } while (yyTok == Tok_Comment); } return matches; } -- cgit v0.12