summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/call-exp.cc
blob: 546ab5f390c3fadcaa355bee9eeb06a8134c7a1a (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
27
/**
 ** \file ast/call-exp.cc
 ** \brief Implementation of ast::CallExp.
 */

#include <ast/call-exp.hh>
#include <ast/visitor.hh>
#include <misc/algorithm.hh>

namespace ast
{
  CallExp::CallExp(const Location& location, misc::symbol name, exps_type* args)
    : Exp(location)
    , name_(name)
    , args_(args)
  {}

  CallExp::~CallExp()
  {
    misc::deep_clear(*args_);
    delete args_;
  }

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

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