diff options
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 8167c24..ddd473a 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -389,7 +389,9 @@ bool ProcessAST::visit(AST::UiScriptBinding *node) primitive = getPrimitive(prop->name, stmt->expression); } else { + out << '{'; pp(node->statement); + out << '}'; } Value *v = new Value; @@ -425,7 +427,7 @@ bool ProcessAST::visit(AST::UiArrayBinding *node) QmlScriptParser::QmlScriptParser() - : root(0) + : root(0), _errorLine(-1) { } @@ -450,6 +452,7 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) if (! parser.parse(&driver)) { _error = parser.errorMessage(); + _errorLine = parser.errorLineNumber(); return false; } @@ -464,6 +467,11 @@ QString QmlScriptParser::errorDescription() const return _error; } +int QmlScriptParser::errorLine() const +{ + return _errorLine; +} + QMap<QString,QString> QmlScriptParser::nameSpacePaths() const { qWarning() << Q_FUNC_INFO << "not implemented"; |