parser: use 'override' keyword in subclasses

This commit is contained in:
Justin Viiret 2015-11-03 16:11:56 +11:00 committed by Matthew Barr
parent 46ad39f253
commit 4c53bd4641
4 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ public:
ReferenceVisitor(size_t num_groups, const flat_set<string> &targets) ReferenceVisitor(size_t num_groups, const flat_set<string> &targets)
: num_ids(num_groups), names(targets) {} : num_ids(num_groups), names(targets) {}
~ReferenceVisitor(); ~ReferenceVisitor() override;
void invalid_index(const char *component, unsigned id) { void invalid_index(const char *component, unsigned id) {
assert(component); assert(component);

View File

@ -201,7 +201,7 @@ const ComponentSequence *findCapturingGroup(const Component *root,
class PrefilterVisitor : public DefaultComponentVisitor { class PrefilterVisitor : public DefaultComponentVisitor {
public: public:
PrefilterVisitor(Component *c, const ParseMode &m) : root(c), mode(m) {} PrefilterVisitor(Component *c, const ParseMode &m) : root(c), mode(m) {}
~PrefilterVisitor(); ~PrefilterVisitor() override;
/** \brief Calls the visitor (recursively) on a new replacement component /** \brief Calls the visitor (recursively) on a new replacement component
* we've just created. Takes care of freeing it if the sequence is itself * we've just created. Takes care of freeing it if the sequence is itself

View File

@ -64,7 +64,7 @@ namespace ue2 {
*/ */
class ConstructLiteralVisitor : public ConstComponentVisitor { class ConstructLiteralVisitor : public ConstComponentVisitor {
public: public:
~ConstructLiteralVisitor(); ~ConstructLiteralVisitor() override;
/** \brief Thrown if this component does not represent a literal. */ /** \brief Thrown if this component does not represent a literal. */
struct NotLiteral {}; struct NotLiteral {};

View File

@ -44,7 +44,7 @@ namespace ue2 {
* an unsupported component. */ * an unsupported component. */
class UnsupportedVisitor : public DefaultConstComponentVisitor { class UnsupportedVisitor : public DefaultConstComponentVisitor {
public: public:
~UnsupportedVisitor(); ~UnsupportedVisitor() override;
void pre(const ComponentAssertion &) override { void pre(const ComponentAssertion &) override {
throw ParseError("Zero-width assertions are not supported."); throw ParseError("Zero-width assertions are not supported.");
} }