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.hh | |
Diffstat (limited to 'tiger-compiler/src/object/tasks.hh')
| -rw-r--r-- | tiger-compiler/src/object/tasks.hh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tiger-compiler/src/object/tasks.hh b/tiger-compiler/src/object/tasks.hh new file mode 100644 index 0000000..9a108f3 --- /dev/null +++ b/tiger-compiler/src/object/tasks.hh @@ -0,0 +1,60 @@ +/** + ** \file object/tasks.hh + ** \brief Object module related tasks. + */ + +#pragma once + +#include <overload/binder.hh> +#include <task/libtask.hh> + +namespace object::tasks +{ + TASK_GROUP("Object"); + + /// Enable object extensions. + BOOLEAN_TASK_DECLARE("o|object", + "enable object extensions", + enable_object_extensions_p, + ""); + + /// Parse the input file, allowing objects. + TASK_DECLARE("object-parse", + "parse a file, allowing objects", + object_parse, + "object parse"); + + // FIXME DONE: Some code was deleted here. + TASK_DECLARE("object-bindings-compute", + "bind the name uses to their definitions, allowing objects", + object_bind, + "object-parse"); + + /// Check for type violation, allowing objects. + TASK_DECLARE("object-types-compute", + "check for type violations, " + "allowing objects", + object_types_compute, + "object-bindings-compute"); + + /// Perform a renaming, before desugaring objects. + TASK_DECLARE("object-rename", + "rename identifiers to unique names, allowing objects", + object_rename, + "object-types-compute"); + + /// Remove syntactic sugar from the Ast. + TASK_DECLARE("object-desugar", + "remove object constructs from the program", + object_desugar, + "object-rename"); + + /// Remove syntactic sugar from the Ast without recomputing + /// bindings nor types. + TASK_DECLARE("raw-object-desugar", + "remove object constructs from the program " + "without recomputing bindings nor types", + raw_object_desugar, + "object-rename"); + +} // namespace object::tasks |
