[C++] Make err_include.mk pass
diff --git a/parser.cc b/parser.cc
index 457e357..d185b51 100644
--- a/parser.cc
+++ b/parser.cc
@@ -134,6 +134,7 @@
if (line[0] == '\t' && state_ != ParserState::NOT_AFTER_RULE) {
CommandAST* ast = new CommandAST();
+ ast->set_loc(loc_);
ast->expr = ParseExpr(line.substr(1), ParseExprOpt::COMMAND);
out_asts_->push_back(ast);
return;
@@ -204,6 +205,7 @@
void ParseInclude(StringPiece line, StringPiece directive) {
IncludeAST* ast = new IncludeAST();
+ ast->set_loc(loc_);
ast->expr = ParseExpr(line);
ast->should_exist = directive[0] == 'i';
out_asts_->push_back(ast);