diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-08-04 12:18:25 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-08-04 12:18:25 +0200 |
commit | 332e6f9a28537117e4ef452f4b8198b2d2ac7c86 (patch) | |
tree | efed841015bfe31ce30a21a3983efd3e94b739e7 /src/shared/cplusplus | |
parent | 85e1b3665261a545541e21b972856369fdb82be3 (diff) | |
download | qt-creator-332e6f9a28537117e4ef452f4b8198b2d2ac7c86.tar.gz |
Stop scanning string literals when the current character is a newline.
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r-- | src/shared/cplusplus/Lexer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/cplusplus/Lexer.cpp b/src/shared/cplusplus/Lexer.cpp index d38aa036cd..3a23e4d6f5 100644 --- a/src/shared/cplusplus/Lexer.cpp +++ b/src/shared/cplusplus/Lexer.cpp @@ -49,6 +49,7 @@ #include "Lexer.h" #include "Control.h" #include "TranslationUnit.h" +#include "Literals.h" #include <cctype> #include <cassert> @@ -255,7 +256,9 @@ void Lexer::scan_helper(Token *tok) const char *yytext = _currentChar; while (_yychar && _yychar != quote) { - if (_yychar != '\\') + if (_yychar == '\n') + break; + else if (_yychar != '\\') yyinp(); else { yyinp(); // skip `\\' |