LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
name-ty.hh
Go to the documentation of this file.
1 
6 #ifndef AST_NAME_TY_HH
7 # define AST_NAME_TY_HH
8 
9 # include <ast/type-dec.hh>
10 # include <ast/ty.hh>
11 # include <misc/symbol.hh>
12 
13 namespace ast
14 {
15 
17  class NameTy : public Ty
18  {
21  public:
23  NameTy(const Location& location, const misc::symbol& name);
25  virtual ~NameTy();
28 
29 
30  public:
32  virtual void accept(ConstVisitor& v) const override;
34  virtual void accept(Visitor& v) override;
36 
39  public:
41  const misc::symbol& name_get() const;
43  void name_set(const misc::symbol&);
45  const TypeDec* def_get() const;
47  TypeDec* def_get();
49  void def_set(TypeDec*);
52  protected:
56  TypeDec* def_ = nullptr;
57  };
58 
59 } // namespace ast
60 
61 # include <ast/name-ty.hxx>
62 
63 #endif // !AST_NAME_TY_HH