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

#include <ast/type-dec.hh>
#include <ast/visitor.hh>

namespace ast
{
  TypeDec::TypeDec(const Location& location, misc::symbol name, Ty* ty)
    : Dec(location, name)
    , TypeConstructor()
    , ty_(ty)
  {}

  TypeDec::~TypeDec() { delete ty_; }

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

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