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/desugar/tasks.cc | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tiger-compiler/src/desugar/tasks.cc (limited to 'tiger-compiler/src/desugar/tasks.cc') diff --git a/tiger-compiler/src/desugar/tasks.cc b/tiger-compiler/src/desugar/tasks.cc new file mode 100644 index 0000000..0b83cb7 --- /dev/null +++ b/tiger-compiler/src/desugar/tasks.cc @@ -0,0 +1,49 @@ +/** + ** \file desugar/tasks.cc + ** \brief Desugar module related tasks' implementation. + **/ + +#include +#include +#include +#include +#define DEFINE_TASKS 1 +#include +#undef DEFINE_TASKS + +namespace desugar::tasks +{ + /*-------------. + | Desugaring. | + `-------------*/ + + void desugar() + { + astclone::apply(::desugar::desugar, ast::tasks::the_program, desugar_for_p, + desugar_string_cmp_p); + /// Escape after desugaring if escape was done before + if (escapes::escaped) + escapes::escapes_compute(*ast::tasks::the_program); + } + + void raw_desugar() + { + astclone::apply(::desugar::raw_desugar, ast::tasks::the_program, + desugar_for_p, desugar_string_cmp_p); + } + + /*-----------------------. + | Array bounds checking. | + `-----------------------*/ + + void bounds_checks_add() + { + astclone::apply(::desugar::bounds_checks_add, ast::tasks::the_program); + } + + void raw_bounds_checks_add() + { + astclone::apply(::desugar::raw_bounds_checks_add, ast::tasks::the_program); + } + +} // namespace desugar::tasks -- cgit v1.2.3