aboutsummaryrefslogtreecommitdiff
path: root/eval.h
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-31 13:07:34 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-31 13:07:34 +0900
commit7e70801d6486d23c689366e1187abe34413c0670 (patch)
treea7711cbafef47ffc70a88fc92adb774ebc0b0016 /eval.h
parentf9e1524ee18063a1b23fa8b6568e522b15d6fe69 (diff)
downloadkati-7e70801d6486d23c689366e1187abe34413c0670.tar.gz
[C++] Regenerate ninja when unset environment variable was set
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index dad8127..31e09f8 100644
--- a/eval.h
+++ b/eval.h
@@ -17,6 +17,7 @@
#include <memory>
#include <unordered_map>
+#include <unordered_set>
#include <vector>
#include "ast.h"
@@ -87,11 +88,17 @@ class Evaluator {
delayed_output_commands_.clear();
}
+ static const unordered_set<Symbol>& used_undefined_vars() {
+ return used_undefined_vars_;
+ }
+
private:
Var* EvalRHS(Symbol lhs, Value* rhs, StringPiece orig_rhs, AssignOp op,
bool is_override = false);
void DoInclude(const string& fname);
+ Var* LookupVarGlobal(Symbol name);
+
const Vars* in_vars_;
Vars* vars_;
unordered_map<Symbol, Vars*> rule_vars_;
@@ -108,6 +115,8 @@ class Evaluator {
// Commands which should run at ninja-time (i.e., info, warning, and
// error).
vector<string> delayed_output_commands_;
+
+ static unordered_set<Symbol> used_undefined_vars_;
};
#endif // EVAL_H_