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/method.hxx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tiger-compiler/src/type/method.hxx (limited to 'tiger-compiler/src/type/method.hxx') diff --git a/tiger-compiler/src/type/method.hxx b/tiger-compiler/src/type/method.hxx new file mode 100644 index 0000000..d026252 --- /dev/null +++ b/tiger-compiler/src/type/method.hxx @@ -0,0 +1,27 @@ +/** + ** \file type/method.hxx + ** \brief Inline methods for type::Method. + */ +#pragma once + +namespace type +{ + inline misc::symbol Method::name_get() const { return name_; } + + inline const Class* Method::owner_get() const { return owner_; } + + inline const Type& Method::type_get() const + { + // FIXME DONE: Some code was deleted here. + return *def_->type_get(); + } + + inline const ast::MethodDec* Method::def_get() const { return def_; } + + inline ast::MethodDec* Method::def_get() { return def_; } + + inline void Method::name_set(misc::symbol name) { name_ = name; } + + inline void Method::def_set(ast::MethodDec* def) { def_ = def; } + +} // namespace type -- cgit v1.2.3