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/type-constructor.hh | |
Diffstat (limited to 'tiger-compiler/src/ast/type-constructor.hh')
| -rw-r--r-- | tiger-compiler/src/ast/type-constructor.hh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/type-constructor.hh b/tiger-compiler/src/ast/type-constructor.hh new file mode 100644 index 0000000..87f57d8 --- /dev/null +++ b/tiger-compiler/src/ast/type-constructor.hh @@ -0,0 +1,38 @@ +/** + ** \file ast/type-constructor.hh + ** \brief Declaration of ast::TypeConstructor. + */ + +#pragma once + +#include <ast/fwd.hh> +#include <type/fwd.hh> + +namespace ast +{ + /** \class ast::TypeConstructor + ** \brief Create a new type. + */ + + class TypeConstructor + { + // FIXME DONE: Some code was deleted here. + public: + // Basic default constructor + // BUT we have a custom destructor this time (daring today aren't we?) + TypeConstructor(); + ~TypeConstructor(); + + // Basic accessors + void created_type_set(const type::Type*); + const type::Type* created_type_get() const; + + // Implementing the visitor so this can also be visited + void accept(ConstVisitor& v) const; + void accept(Visitor& v); + + private: + const type::Type* reference_; + }; +} // namespace ast +#include <ast/type-constructor.hxx> |
