summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/assign-exp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/ast/assign-exp.cc')
-rw-r--r--tiger-compiler/src/ast/assign-exp.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/assign-exp.cc b/tiger-compiler/src/ast/assign-exp.cc
new file mode 100644
index 0000000..d61b5c2
--- /dev/null
+++ b/tiger-compiler/src/ast/assign-exp.cc
@@ -0,0 +1,26 @@
+/**
+ ** \file ast/assign-exp.cc
+ ** \brief Implementation of ast::AssignExp.
+ */
+
+#include <ast/assign-exp.hh>
+#include <ast/visitor.hh>
+
+namespace ast
+{
+ AssignExp::AssignExp(const Location& location, Var* var, Exp* exp)
+ : Exp(location)
+ , var_(var)
+ , exp_(exp)
+ {}
+
+ AssignExp::~AssignExp()
+ {
+ delete var_;
+ delete exp_;
+ }
+
+ void AssignExp::accept(ConstVisitor& v) const { v(*this); }
+
+ void AssignExp::accept(Visitor& v) { v(*this); }
+} // namespace ast