Add virtual destructor to TreeVisitorBase
This commit is contained in:
parent
3e0b12f646
commit
12c7cdcf0e
@ -23,6 +23,7 @@ class EdgePart;
|
||||
|
||||
class TreeVisitorBase {
|
||||
public:
|
||||
virtual ~TreeVisitorBase() {}
|
||||
// Start of the tree is a Query.
|
||||
virtual void PreVisit(Query &) {}
|
||||
virtual void Visit(Query &query) = 0;
|
||||
@ -71,7 +72,6 @@ public:
|
||||
|
||||
class Ident : public Expr {
|
||||
public:
|
||||
Ident(int) = delete;
|
||||
Ident(int uid, const std::string &identifier)
|
||||
: Expr(uid), identifier_(identifier) {}
|
||||
|
||||
@ -85,11 +85,6 @@ public:
|
||||
std::string identifier_;
|
||||
};
|
||||
|
||||
class Part : public Tree {
|
||||
public:
|
||||
Part(int uid) : Tree(uid) {}
|
||||
};
|
||||
|
||||
class NamedExpr : public Tree {
|
||||
public:
|
||||
NamedExpr(int uid) : Tree(uid) {}
|
||||
@ -106,6 +101,11 @@ public:
|
||||
std::shared_ptr<Expr> expr_;
|
||||
};
|
||||
|
||||
class Part : public Tree {
|
||||
public:
|
||||
Part(int uid) : Tree(uid) {}
|
||||
};
|
||||
|
||||
class NodePart : public Part {
|
||||
public:
|
||||
NodePart(int uid) : Part(uid) {}
|
||||
|
Loading…
Reference in New Issue
Block a user