From c2e756dc1962eeb3575f618b38272359d4fccc89 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Tue, 11 Feb 2020 16:22:12 +0100 Subject: Introduce BaseVisitor Base Visitor is an abstract visitor that has all visit methods abstract, subclassing this one gets an error if some visit method is not implemented (dumper and reformatter for example will gain from this. Change-Id: I3f8cfeb6fc0ef917acf725bbe1c293d761304287 Reviewed-by: Ulf Hermann --- src/qml/parser/qqmljsastvisitor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/qml/parser/qqmljsastvisitor.cpp') diff --git a/src/qml/parser/qqmljsastvisitor.cpp b/src/qml/parser/qqmljsastvisitor.cpp index 5ecac36423..7388eccebb 100644 --- a/src/qml/parser/qqmljsastvisitor.cpp +++ b/src/qml/parser/qqmljsastvisitor.cpp @@ -43,11 +43,13 @@ QT_BEGIN_NAMESPACE namespace QQmlJS { namespace AST { -Visitor::Visitor(quint16 parentRecursionDepth) : m_recursionDepth(parentRecursionDepth) +Visitor::Visitor(quint16 parentRecursionDepth) : BaseVisitor(parentRecursionDepth) { } -Visitor::~Visitor() +BaseVisitor::BaseVisitor(quint16 parentRecursionDepth) : m_recursionDepth(parentRecursionDepth) {} + +BaseVisitor::~BaseVisitor() { } -- cgit v1.2.3