blob: 2ed51e1da15859dfdc6b9c6ad9a39bdcc99cf1a1 (
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
|
/**
** \file ast/for-exp.cc
** \brief Implementation of ast::ForExp.
*/
#include <ast/for-exp.hh>
#include <ast/visitor.hh>
namespace ast
{
ForExp::ForExp(const Location& location, VarDec* vardec, Exp* hi, Exp* body)
: Exp(location)
, vardec_(vardec)
, hi_(hi)
, body_(body)
{}
ForExp::~ForExp()
{
delete vardec_;
delete hi_;
delete body_;
}
void ForExp::accept(ConstVisitor& v) const { v(*this); }
void ForExp::accept(Visitor& v) { v(*this); }
} // namespace ast
|