LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
type-checker.hxx
Go to the documentation of this file.
1
6
#ifndef TYPE_TYPE_CHECKER_HXX
7
# define TYPE_TYPE_CHECKER_HXX
8
9
# include <
ast/all.hh
>
10
# include <
type/types.hh
>
11
# include <
type/type-checker.hh
>
12
13
namespace
type
14
{
15
16
/*----------------.
17
| Setting types. |
18
`----------------*/
19
20
// FIXME: Some code was deleted here.
21
22
23
/*-----------------.
24
| Error handling. |
25
`-----------------*/
26
27
template
<
typename
T>
28
void
29
TypeChecker::error
(
const
ast::Ast
& loc,
const
std::string& msg,
30
const
T& exp)
31
{
32
error_
<<
misc::error::type
33
<< loc.
location_get
() <<
": "
<< msg <<
": "
<< exp << std::endl;
34
}
35
36
template
<
typename
T,
typename
U>
37
void
38
TypeChecker::error_and_recover
(T& loc,
const
std::string& msg,
const
U& exp)
39
{
40
error
(loc, msg, exp);
41
loc.type_set(&Int::instance());
42
}
43
44
45
template
<
typename
Routine_Type,
typename
Routine_Node>
46
void
47
TypeChecker::visit_routine_body
(Routine_Node& e)
48
{
49
// FIXME: Some code was deleted here.
50
}
51
}
52
53
#endif // !TYPE_TYPE_CHECKER_HXX
type
type-checker.hxx
Generated on Wed Mar 5 2014 15:47:37 for LRDE Tiger Compiler by
1.8.1.2