Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
332e6f9a
Commit
332e6f9a
authored
Aug 04, 2009
by
Roberto Raggi
Browse files
Stop scanning string literals when the current character is a newline.
parent
85e1b366
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Lexer.cpp
View file @
332e6f9a
...
...
@@ -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 `\\'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment