diff options
Diffstat (limited to 'tiger-compiler/src/ast/cast-exp.cc')
| -rw-r--r-- | tiger-compiler/src/ast/cast-exp.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/cast-exp.cc b/tiger-compiler/src/ast/cast-exp.cc new file mode 100644 index 0000000..e40f8f0 --- /dev/null +++ b/tiger-compiler/src/ast/cast-exp.cc @@ -0,0 +1,26 @@ +/** + ** \file ast/cast-exp.cc + ** \brief Implementation of ast::CastExp. + */ + +#include <ast/cast-exp.hh> +#include <ast/visitor.hh> + +namespace ast +{ + CastExp::CastExp(const Location& location, Exp* exp, Ty* ty) + : Exp(location) + , exp_(exp) + , ty_(ty) + {} + + CastExp::~CastExp() + { + delete exp_; + delete ty_; + } + + void CastExp::accept(ConstVisitor& v) const { v(*this); } + + void CastExp::accept(Visitor& v) { v(*this); } +} // namespace ast |
