blob: 8c0f241d866fa0a736f1f3eb78a5943be1077695 (
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
28
29
30
31
|
/**
** \file ast/array-exp.cc
** \brief Implementation of ast::ArrayExp.
*/
#include <ast/array-exp.hh>
#include <ast/visitor.hh>
namespace ast
{
ArrayExp::ArrayExp(const Location& location,
NameTy* type_name,
Exp* size,
Exp* init)
: Exp(location)
, type_name_(type_name)
, size_(size)
, init_(init)
{}
ArrayExp::~ArrayExp()
{
delete type_name_;
delete size_;
delete init_;
}
void ArrayExp::accept(ConstVisitor& v) const { v(*this); }
void ArrayExp::accept(Visitor& v) { v(*this); }
} // namespace ast
|