[C++] Parse include directives
diff --git a/ast.cc b/ast.cc
index b755ce9..79cea85 100644
--- a/ast.cc
+++ b/ast.cc
@@ -41,6 +41,11 @@
expr->DebugString().c_str(), LOCF(loc()));
}
+string IncludeAST::DebugString() const {
+ return StringPrintf("IncludeAST(%s, loc=%s:%d)",
+ expr->DebugString().c_str(), LOCF(loc()));
+}
+
RuleAST::~RuleAST() {
delete expr;
delete after_term;
@@ -66,3 +71,11 @@
void CommandAST::Eval(Evaluator* ev) const {
ev->EvalCommand(this);
}
+
+IncludeAST::~IncludeAST() {
+ delete expr;
+}
+
+void IncludeAST::Eval(Evaluator* ev) const {
+ ev->EvalInclude(this);
+}