diff options
Diffstat (limited to 'tiger-compiler/src/ast/field-init.cc')
| -rw-r--r-- | tiger-compiler/src/ast/field-init.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/field-init.cc b/tiger-compiler/src/ast/field-init.cc new file mode 100644 index 0000000..54b5266 --- /dev/null +++ b/tiger-compiler/src/ast/field-init.cc @@ -0,0 +1,22 @@ +/** + ** \file ast/field-init.cc + ** \brief Implementation of ast::FieldInit. + */ + +#include <ast/field-init.hh> +#include <ast/visitor.hh> + +namespace ast +{ + FieldInit::FieldInit(const Location& location, misc::symbol name, Exp* init) + : Ast(location) + , name_(name) + , init_(init) + {} + + FieldInit::~FieldInit() { delete init_; } + + void FieldInit::accept(ConstVisitor& v) const { v(*this); } + + void FieldInit::accept(Visitor& v) { v(*this); } +} // namespace ast |
