diff options
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 31a20be..5207292 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -178,6 +178,8 @@ protected: virtual bool visit(AST::UiArrayBinding *node); virtual bool visit(AST::UiSourceElement *node); + virtual bool visit(AST::ExpressionStatement *node); + void accept(AST::Node *node); QString asString(AST::UiQualifiedId *node) const; @@ -638,6 +640,14 @@ bool ProcessAST::visit(AST::UiScriptBinding *node) return true; } +bool ProcessAST::visit(AST::ExpressionStatement *node) +{ + if (!node->semicolonToken.isValid()) + _parser->addAutomaticSemicolonOffset(node->semicolonToken.offset); + + return true; +} + // UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiObjectMemberList T_RBRACKET ; bool ProcessAST::visit(AST::UiArrayBinding *node) { @@ -825,6 +835,7 @@ void QmlScriptParser::clear() _nameSpacePaths.clear(); _typeNames.clear(); _errors.clear(); + _automaticSemicolonOffsets.clear(); if (data) { delete data; |