LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
simple-var.hh
Go to the documentation of this file.
1 
6 #ifndef AST_SIMPLE_VAR_HH
7 # define AST_SIMPLE_VAR_HH
8 
9 # include <ast/var.hh>
10 # include <ast/var-dec.hh>
11 # include <misc/symbol.hh>
12 
13 namespace ast
14 {
15 
17  class SimpleVar : public Var
18  {
21  public:
23  SimpleVar(const Location& location, const misc::symbol& name);
25  virtual ~SimpleVar();
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 VarDec* def_get() const;
47  VarDec* def_get();
49  void def_set(VarDec*);
52  protected:
56  VarDec* def_ = nullptr;
57  };
58 
59 } // namespace ast
60 
61 # include <ast/simple-var.hxx>
62 
63 #endif // !AST_SIMPLE_VAR_HH