diff options
author | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-02-11 16:22:12 +0100 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-02-12 18:28:17 +0100 |
commit | c2e756dc1962eeb3575f618b38272359d4fccc89 (patch) | |
tree | a4848574d0e2b341f15256b8099d6404549f6396 /src/qml/parser/qqmljsastvisitor.cpp | |
parent | 7f7bf177f41d7824aecee9f046a8a63ef4d82521 (diff) |
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 <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsastvisitor.cpp')
-rw-r--r-- | src/qml/parser/qqmljsastvisitor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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() { } |