From 30616088b98b4f95f85993c069c8086d36151caa Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 18 Mar 2019 10:31:10 +0100 Subject: Handle recursion depth errors when parsing JavaScript in lupdate Implementations of QQmlJS::AST::Visitor are required to do so. Task-number: QTBUG-74510 Change-Id: I0081d2d2e4385402022a6eb8b046e82ebd68983c Reviewed-by: Simon Hausmann --- src/linguist/lupdate/qdeclarative.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/linguist/lupdate/qdeclarative.cpp b/src/linguist/lupdate/qdeclarative.cpp index 40af15566..0938b86e8 100644 --- a/src/linguist/lupdate/qdeclarative.cpp +++ b/src/linguist/lupdate/qdeclarative.cpp @@ -221,6 +221,13 @@ private: return std::cerr << qPrintable(m_fileName) << ':' << line << ": "; } + void throwRecursionDepthError() + { + std::cerr << qPrintable(m_fileName) << ": " + << qPrintable(LU::tr("Maximum statement or expression depth exceeded")); + } + + void processComments(quint32 offset, bool flush = false); void processComment(const AST::SourceLocation &loc); void consumeComment(); -- cgit v1.2.3