From 20a6d9d2aba189eb52bc9986f83c8083a6a32fd9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 2 Jun 2013 22:56:59 +0200 Subject: [PATCH] Set the Lexer into qml mode when parsing binding expressions Binding expressions allow multiline strings and digits starting with 0. Simply setting the lexer into qmlmode when parsing them will allow these expressions to pass. Fixes 3 more test failures in qqmlecmascript Change-Id: Ia14ec6d3facaf31883bb824c57096e59df3efea2 Reviewed-by: Simon Hausmann --- src/qml/qml/v4/qv4script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/qml/v4/qv4script.cpp b/src/qml/qml/v4/qv4script.cpp index 0e11831..1a0e392 100644 --- a/src/qml/qml/v4/qv4script.cpp +++ b/src/qml/qml/v4/qv4script.cpp @@ -119,7 +119,7 @@ void Script::parse() QQmlJS::Engine ee, *engine = ⅇ Lexer lexer(engine); - lexer.setCode(sourceCode, line, false); + lexer.setCode(sourceCode, line, parseAsBinding); Parser parser(engine); const bool parsed = parser.parseProgram(); -- 2.7.4