summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-03-18 10:31:10 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-19 09:20:24 +0000
commit30616088b98b4f95f85993c069c8086d36151caa (patch)
treedfed57eaf0ca4c7fef073518e6c425a2e6d882cd
parent9b5c31944fb03eea6025186c27cf809cc4a9ae05 (diff)
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 <simon.hausmann@qt.io>
-rw-r--r--src/linguist/lupdate/qdeclarative.cpp7
1 files changed, 7 insertions, 0 deletions
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();