summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/assign-exp.cc
blob: d61b5c2a4540db8990036c93b507e81892e142af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
 ** \file ast/assign-exp.cc
 ** \brief Implementation of ast::AssignExp.
 */

#include <ast/assign-exp.hh>
#include <ast/visitor.hh>

namespace ast
{
  AssignExp::AssignExp(const Location& location, Var* var, Exp* exp)
    : Exp(location)
    , var_(var)
    , exp_(exp)
  {}

  AssignExp::~AssignExp()
  {
    delete var_;
    delete exp_;
  }

  void AssignExp::accept(ConstVisitor& v) const { v(*this); }

  void AssignExp::accept(Visitor& v) { v(*this); }
} // namespace ast