diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/ast/seq-exp.hh | |
Diffstat (limited to 'tiger-compiler/src/ast/seq-exp.hh')
| -rw-r--r-- | tiger-compiler/src/ast/seq-exp.hh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/seq-exp.hh b/tiger-compiler/src/ast/seq-exp.hh new file mode 100644 index 0000000..882c11e --- /dev/null +++ b/tiger-compiler/src/ast/seq-exp.hh @@ -0,0 +1,47 @@ +/** + ** \file ast/seq-exp.hh + ** \brief Declaration of ast::SeqExp. + */ + +#pragma once + +#include <ast/exp.hh> + +namespace ast +{ + /// SeqExp. + class SeqExp : public Exp + { + public: + /** \name Ctor & dtor. + ** \{ */ + /// Construct a SeqExp node. + SeqExp(const Location& location, exps_type* exps); + SeqExp(const SeqExp&) = delete; + SeqExp& operator=(const SeqExp&) = delete; + /// Destroy a SeqExp node. + ~SeqExp() override; + /** \} */ + + /// \name Visitors entry point. + /// \{ */ + /// Accept a const visitor \a v. + void accept(ConstVisitor& v) const override; + /// Accept a non-const visitor \a v. + void accept(Visitor& v) override; + /// \} + + /** \name Accessors. + ** \{ */ + /// Return list of expressions. + const exps_type& exps_get() const; + /// Return list of expressions. + exps_type& exps_get(); + /** \} */ + + protected: + /// List of expressions. + exps_type* exps_; + }; +} // namespace ast +#include <ast/seq-exp.hxx> |
