aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljslexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/parser/qqmljslexer.cpp')
-rw-r--r--src/qml/parser/qqmljslexer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp
index f1f6a68583..cdab17ff63 100644
--- a/src/qml/parser/qqmljslexer.cpp
+++ b/src/qml/parser/qqmljslexer.cpp
@@ -889,12 +889,14 @@ int Lexer::scanString(ScanStringMode mode)
// in case we just parsed a \r, we need to reset this flag to get things working
// correctly in the loop below and afterwards
_skipLinefeed = false;
+ bool first = true;
if (_engine) {
while (_codePtr <= _endPtr) {
if (isLineTerminator()) {
if ((quote == u'`' || qmlMode())) {
- --_currentLineNumber; // will be read again in scanChar()
+ if (first)
+ --_currentLineNumber; // will be read again in scanChar()
break;
}
_errorCode = IllegalCharacter;
@@ -922,6 +924,7 @@ int Lexer::scanString(ScanStringMode mode)
// don't use scanChar() here, that would transform \r sequences and the midRef() call would create the wrong result
_char = *_codePtr++;
++_currentColumnNumber;
+ first = false;
}
}