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/object/tasks.cc | |
Diffstat (limited to 'tiger-compiler/src/object/tasks.cc')
| -rw-r--r-- | tiger-compiler/src/object/tasks.cc | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tiger-compiler/src/object/tasks.cc b/tiger-compiler/src/object/tasks.cc new file mode 100644 index 0000000..c4d0929 --- /dev/null +++ b/tiger-compiler/src/object/tasks.cc @@ -0,0 +1,52 @@ +/** + ** \file object/tasks.cc + ** \brief Object module related tasks' implementation. + */ + +#include <memory> + +#include <ast/tasks.hh> +#include <astclone/libastclone.hh> +#include <common.hh> +#include <object/libobject.hh> +#define DEFINE_TASKS 1 +#include <object/tasks.hh> +#undef DEFINE_TASKS + +namespace object::tasks +{ + void object_parse() {} + + // FIXME DONE: Some code was deleted here. + void object_bind() + { + task_error() << bind_obj(ast::tasks::the_program.get()) + << &misc::error::exit_on_error; + } + + void object_types_compute() + { + task_error() << ::object::types_check(*ast::tasks::the_program) + << &misc::error::exit_on_error; + } + + static std::unique_ptr<class_names_type> class_names; + + void object_rename() + { + class_names.reset(::object::rename(*ast::tasks::the_program)); + } + + void object_desugar() + { + astclone::apply(::object::desugar, ast::tasks::the_program, + *class_names.get()); + } + + void raw_object_desugar() + { + astclone::apply(::object::raw_desugar, ast::tasks::the_program, + *class_names.get()); + } + +} // namespace object::tasks |
