summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/array-ty.cc
blob: d7af8b4d7a3b234c3676156f4f6d6ea5cc20e81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 ** \file ast/array-ty.cc
 ** \brief Implementation of ast::ArrayTy.
 */

#include <ast/array-ty.hh>
#include <ast/visitor.hh>

namespace ast
{
  ArrayTy::ArrayTy(const Location& location, NameTy* base_type)
    : Ty(location)
    , base_type_(base_type)
  {}

  ArrayTy::~ArrayTy() { delete base_type_; }

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

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