summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/bind/tasks.cc
blob: 649246342c628bfe03a679c542250a5ba817ee69 (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
/**
 ** \file bind/tasks.cc
 ** \brief Bind module tasks implementation.
 */

// FIXME DONE: Some code was deleted here.
#include <ast/libast.hh>
#include <ast/tasks.hh>
#include <bind/libbind.hh>
#define DEFINE_TASKS 1
#include <bind/tasks.hh>
#undef DEFINE_TASKS
#include <common.hh>

namespace bind::tasks
{

  void bind() {
    misc::error& program_error = task_error();
    program_error << bind::bind(ast::tasks::the_program.get());
    program_error.exit_on_error();
  }

  void display_bind() {
    ast::bindings_display(std::cout) = true;
  }

  void rename() {
    misc::error& program_error = task_error();
    program_error << bind::rename(*ast::tasks::the_program);
    program_error.exit_on_error();
  }

}