LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
builtin-types.hh
Go to the documentation of this file.
1 
5 #ifndef TYPE_BUILTIN_TYPES_HH
6 # define TYPE_BUILTIN_TYPES_HH
7 
8 # include <type/type.hh>
9 # include <type/fwd.hh>
10 
11 namespace type
12 {
13 
15  class Nil : public Type
16  {
17  // Make it non-copyable.
18  Nil(const Nil&) = delete;
19  Nil & operator= (const Nil&) = delete;
20 
21  public:
23  static const Nil& instance();
24 
25  public:
26  virtual bool compatible_with(const Type& other) const override;
27 
28  public:
30  virtual std::ostream& dump(std::ostream& ostr) const override;
31 
32  private:
35  Nil() = default;
36  };
37 
38 
39  // FIXME: Some code was deleted here (Other types : String, Int, Void).
40 
41 } // namespace type
42 
43 #endif // !TYPE_BUILTIN_TYPES_HH