blob: 8114b740c9d9bef682850f1e42e5be1ca0579af5 (
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
|
/**
** \file assert/libassert.cc
** \brief Implementation of functions exported by the assert module.
*/
#include <assert/binder.hh>
#include <assert/libassert.hh>
#include <assert/renamer.hh>
#include <assert/type-checker.hh>
#include <misc/error.hh>
namespace assert
{
misc::error bind(ast::Ast& last)
{
Binder binder;
binder(last);
return binder.error_get();
}
misc::error types_check(ast::Ast& tree)
{
TypeChecker typer;
typer(tree);
return typer.error_get();
}
misc::error rename(ast::Ast& ast)
{
Renamer renamer;
renamer(ast);
return misc::error{};
}
}
|