diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-03-19 13:04:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-20 05:06:54 +0100 |
commit | 9582ca0ce1758572d1ad59548fe221ca2e51598b (patch) | |
tree | 442c8cb0dfafb1c276426f776224c1c930f941b6 /src | |
parent | 7148a79775e31eb5e3053f82f4ee5a9ba702ddae (diff) |
Fix multi-line string content.
ECMA5.1, paragraph 7.8.4, item 9 under semantics: The SV of
LineContinuation :: \ LineTerminatorSequence
is the empty character sequence.
So, do not add any line-terminator inside a multi-line string. Escaped
characters like \r and \n are added of course.
Change-Id: I8c58b7971b1d1bc90adc795ea278541758246e01
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/parser/qqmljslexer.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/qml/qml/parser/qqmljslexer.cpp b/src/qml/qml/parser/qqmljslexer.cpp index 0df49279e2..cb78238f99 100644 --- a/src/qml/qml/parser/qqmljslexer.cpp +++ b/src/qml/qml/parser/qqmljslexer.cpp @@ -782,22 +782,11 @@ again: return T_ERROR; case '\r': - if (isLineTerminatorSequence() == 2) { - _tokenText += QLatin1Char('\r'); - u = QLatin1Char('\n'); - } else { - u = QLatin1Char('\r'); - } - scanChar(); - break; - case '\n': case 0x2028u: case 0x2029u: - u = _char; scanChar(); - break; - + continue; default: // non escape character |