[C++] Implement export and unexport
diff --git a/ast.cc b/ast.cc
index 68f007e..3e117fd 100644
--- a/ast.cc
+++ b/ast.cc
@@ -82,6 +82,13 @@
expr->DebugString().c_str(), LOCF(loc()));
}
+string ExportAST::DebugString() const {
+ return StringPrintf("ExportAST(%s, %d, loc=%s:%d)",
+ expr->DebugString().c_str(),
+ is_export,
+ LOCF(loc()));
+}
+
RuleAST::~RuleAST() {
delete expr;
delete after_term;
@@ -124,3 +131,11 @@
void IncludeAST::Eval(Evaluator* ev) const {
ev->EvalInclude(this);
}
+
+ExportAST::~ExportAST() {
+ delete expr;
+}
+
+void ExportAST::Eval(Evaluator* ev) const {
+ ev->EvalExport(this);
+}