/** ** \file ast/assert-exp.hh ** \brief Declaration of ast::AssertExp. */ #pragma once #include namespace ast { // AssertExp class AssertExp : public Exp { public: /// Construct an AssertExp node. AssertExp(const Location& location, Exp* cond); AssertExp(const AssertExp&) = delete; AssertExp& operator=(const AssertExp&) = delete; /// Destroy an AssertExp node. ~AssertExp() override; // Here are the visitor methods /// Accept a const visitor \a v. void accept(ConstVisitor& v) const override; /// Accept a non-const visitor \a v. void accept(Visitor& v) override; // Some basic getters // Return the asserted condition in const form const Exp& cond_get() const; // Return the asserted condition Exp& cond_get(); protected: // The condition that the assertion will evaluate Exp* cond_; }; } // namespace ast #include