Give Rule a virtual destructor
Not needed at the moment because rule pointers are are always wrapped in shared_ptrs. Still, don't want to forget this if I stopped using shared_ptrs at some point.
This commit is contained in:
parent
b86203d205
commit
b2cb78166e
2 changed files with 3 additions and 0 deletions
|
|
@ -21,5 +21,7 @@ namespace tree_sitter {
|
|||
stream << string("#<null-rule>");
|
||||
return stream;
|
||||
}
|
||||
|
||||
Rule::~Rule() {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ namespace tree_sitter {
|
|||
virtual rule_ptr copy() const = 0;
|
||||
virtual std::string to_string() const = 0;
|
||||
virtual void accept(Visitor *visitor) const = 0;
|
||||
virtual ~Rule();
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& stream, const Rule &rule);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue