Handle recursion depth errors when parsing JavaScript

Implementations of QQmlJS::AST::Visitor are required to do so.

Change-Id: I47d55d25d7c4dd3f826b3cd24a29fc4287d113c8
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Liang Qi 2019-03-20 13:41:04 +01:00
parent 7eaca8c4f8
commit b107451957
1 changed files with 5 additions and 0 deletions

View File

@ -104,6 +104,11 @@ public:
{
nodeStack.removeLast();
}
void throwRecursionDepthError()
{
QFAIL("Maximum statement or expression depth exceeded");
}
};
}