From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- tiger-compiler/src/type/attribute.hxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tiger-compiler/src/type/attribute.hxx (limited to 'tiger-compiler/src/type/attribute.hxx') diff --git a/tiger-compiler/src/type/attribute.hxx b/tiger-compiler/src/type/attribute.hxx new file mode 100644 index 0000000..e59177d --- /dev/null +++ b/tiger-compiler/src/type/attribute.hxx @@ -0,0 +1,25 @@ +/** + ** \file type/attribute.hxx + ** \brief Inline methods for type::Attribute. + */ +#pragma once + +#include + +namespace type +{ + inline misc::symbol Attribute::name_get() const { return def_->name_get(); } + + inline const Type& Attribute::type_get() const + { + // FIXME DONE: Some code was deleted here. + precondition(def_->type_get() != nullptr); + + return *def_->type_get(); + } + + inline const ast::VarDec* Attribute::def_get() const { return def_; } + + inline void Attribute::def_set(const ast::VarDec* def) { def_ = def; } + +} // namespace type -- cgit v1.2.3