summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/assert/tasks.cc
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
commit967be9e750221ab2ab783f95df79bb26d290a45e (patch)
tree6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/assert/tasks.cc
add: added projectsHEADmain
Diffstat (limited to 'tiger-compiler/src/assert/tasks.cc')
-rw-r--r--tiger-compiler/src/assert/tasks.cc53
1 files changed, 53 insertions, 0 deletions
diff --git a/tiger-compiler/src/assert/tasks.cc b/tiger-compiler/src/assert/tasks.cc
new file mode 100644
index 0000000..3e43ecd
--- /dev/null
+++ b/tiger-compiler/src/assert/tasks.cc
@@ -0,0 +1,53 @@
+/**
+ ** \file assert/tasks.cc
+ ** \brief Assert module related tasks' implementation.
+ */
+
+#include <ast/tasks.hh>
+#include <astclone/libastclone.hh>
+#include <assert/libassert.hh>
+#include <common.hh>
+#include <desugar/tasks.hh>
+#include <escapes/tasks.hh>
+#include <llvmtranslate/tasks.hh>
+#define DEFINE_TASKS 1
+#include <assert/tasks.hh>
+#undef DEFINE_TASKS
+
+namespace assert::tasks
+{
+ void parse() {}
+
+ void bind()
+ {
+ task_error() << ::assert::bind(*ast::tasks::the_program.get())
+ << &misc::error::exit_on_error;
+ }
+
+ void types_compute()
+ {
+ task_error() << ::assert::types_check(*ast::tasks::the_program.get())
+ << &misc::error::exit_on_error;
+ }
+
+ void rename()
+ {
+ task_error() << ::assert::rename(*ast::tasks::the_program.get())
+ << &misc::error::exit_on_error;
+ }
+
+ void desugar()
+ {
+ astclone::apply(::assert::desugar, ast::tasks::the_program,
+ desugar::tasks::desugar_for_p,
+ desugar::tasks::desugar_string_cmp_p);
+ }
+
+ void raw_desugar()
+ {
+ astclone::apply(::assert::raw_desugar, ast::tasks::the_program,
+ desugar::tasks::desugar_for_p,
+ desugar::tasks::desugar_string_cmp_p);
+ }
+
+} // namespace assert::tasks