diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-10 10:28:10 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-06-11 03:17:51 (GMT) |
commit | 33c51421dad91263b5db1fa0d0de27ef0eeb231e (patch) | |
tree | 7ad64ae0e8f6166999d371d40f9a95a935391837 | |
parent | 3b0034320863af4806827f36e394ad521fcc0a0d (diff) | |
download | Qt-33c51421dad91263b5db1fa0d0de27ef0eeb231e.zip Qt-33c51421dad91263b5db1fa0d0de27ef0eeb231e.tar.gz Qt-33c51421dad91263b5db1fa0d0de27ef0eeb231e.tar.bz2 |
don't let comments weaved into strings confuse us
Reviewed-by: TrustMe
Task-number: 254260
Testcase: 323072@p4
(cherry picked from commit 941a03814a5f8f7be93425f71ee65a4222d16899)
-rw-r--r-- | tools/linguist/shared/cpp.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/linguist/shared/cpp.cpp b/tools/linguist/shared/cpp.cpp index 5fd8265..22fbe9c 100644 --- a/tools/linguist/shared/cpp.cpp +++ b/tools/linguist/shared/cpp.cpp @@ -465,7 +465,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; } |