summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/object/tasks.hh
blob: 9a108f3dd5c42151e21fddee66baf963bd167cb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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