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/assert/tasks.hh | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tiger-compiler/src/assert/tasks.hh (limited to 'tiger-compiler/src/assert/tasks.hh') diff --git a/tiger-compiler/src/assert/tasks.hh b/tiger-compiler/src/assert/tasks.hh new file mode 100644 index 0000000..7f062de --- /dev/null +++ b/tiger-compiler/src/assert/tasks.hh @@ -0,0 +1,59 @@ +/** + ** \file assert/tasks.hh + ** \brief Assert module related tasks. + */ + +#pragma once + +#include + +// The tasks of the assert module +namespace assert::tasks +{ + TASK_GROUP("Assert"); + + // Enable assert extensions. + BOOLEAN_TASK_DECLARE("assert", + "enable assert extensions", + enable_assert_extensions_p, + ""); + + // Parse the input file, allowing assertions. + TASK_DECLARE("assert-parse", + "parse a file, allowing assertions", + parse, + "assert parse"); + + // Bind the parsed file, allowing assertions. + TASK_DECLARE("assert-bindings-compute", + "bind the name uses to their definitions, allowing assertions", + bind, + "assert-parse"); + + // Check for type violation, allowing assertions. + TASK_DECLARE("assert-types-compute", + "check for type violations, allowing assertions", + types_compute, + "assert-bindings-compute"); + + // Perform a renaming, before desugaring assertions. + TASK_DECLARE("assert-rename", + "rename identifiers to unique names, allowing assertions", + rename, + "assert-bindings-compute"); + + // Remove syntactic sugar from the Ast. + TASK_DECLARE("assert-desugar", + "remove assertions constructs from the program", + desugar, + "assert-rename assert-types-compute"); + + // Remove syntactic sugar from the Ast without recomputing + // bindings nor types. + TASK_DECLARE("raw-assert-desugar", + "remove assertions constructs from the program " + "without recomputing bindings nor types", + raw_desugar, + "assert-rename assert-types-compute"); + +} // namespace assert::tasks -- cgit v1.2.3