LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
function.hxx
Go to the documentation of this file.
1 
5 #ifndef TYPE_FUNCTION_HXX
6 # define TYPE_FUNCTION_HXX
7 
8 # include <type/function.hh>
9 # include <misc/contract.hh>
10 
11 namespace type
12 {
13  inline
14  Function::Function(const Record* formals, const Type& result)
15  : result_(result)
16  {
17  precondition(formals);
18 
19  formals_ = formals;
20  }
21 
22  inline
24  {
25  delete formals_;
26  }
27 
28  inline
29  const Record&
31  {
32  return *formals_;
33  }
34 
35  inline
36  const Type&
38  {
39  return result_;
40  }
41 
42 } // namespace type
43 
44 #endif // !TYPE_FUNCTION_HXX