blob: 3ffa5e1f681a131f7a5848e0e1d702b1600f451e (
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
|
/**
** \file ast/while-exp.cc
** \brief Implementation of ast::WhileExp.
*/
#include <ast/visitor.hh>
#include <ast/while-exp.hh>
namespace ast
{
WhileExp::WhileExp(const Location& location, Exp* test, Exp* body)
: Exp(location)
, test_(test)
, body_(body)
{}
WhileExp::~WhileExp()
{
delete test_;
delete body_;
}
void WhileExp::accept(ConstVisitor& v) const { v(*this); }
void WhileExp::accept(Visitor& v) { v(*this); }
} // namespace ast
|