From b09a48599e7e5db5447189136353b79aca3898cf Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Fri, 28 Feb 2020 17:51:32 +0100 Subject: Update qmljs parser to Qt 5.15 parser * parser side support for annotations, inline components, new UiVersion and all the things included in QT 5.15 parser * SourceLocation moved from QmlJS:AST to QmlJS * Visitors now need to handle throwRecursionDepthError * BaseVisitor for visitors that want to override all visit Task-number: QTCREATORBUG-23591 Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630 Reviewed-by: Fabian Kosmale Reviewed-by: Simon Hausmann --- src/libs/qmljs/qmljsinterpreter.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/libs/qmljs/qmljsinterpreter.cpp') diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 695cad1600..df6d59c461 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -1992,7 +1993,7 @@ public: } protected: - bool visit(ArrayMemberExpression *ast) + bool visit(ArrayMemberExpression *ast) override { if (IdentifierExpression *idExp = cast(ast->base)) { if (idExp->name == QLatin1String("arguments")) @@ -2002,8 +2003,12 @@ protected: } // don't go into nested functions - bool visit(Program *) { return false; } - bool visit(StatementList *) { return false; } + bool visit(Program *) override { return false; } + bool visit(StatementList *) override { return false; } + + void throwRecursionDepthError() override { + qWarning("Warning: Hit maximum recursion error visiting AST in UsesArgumentsArray"); + } }; } // anonymous namespace -- cgit v1.2.1