aboutsummaryrefslogtreecommitdiff
path: root/eval.h
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-06-26 06:47:10 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-06-26 16:42:23 +0900
commit45a0c76779c3ea40bce4af89c039f8d853cd2d43 (patch)
tree31f68202592db579ece529c2e93cd30f89ab8c51 /eval.h
parent0ea9e9163eb86269af2ddae2649780cb491cc7ed (diff)
downloadkati-45a0c76779c3ea40bce4af89c039f8d853cd2d43.tar.gz
[C++] Implement export and unexport
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index 53b0825..c07d2bd 100644
--- a/eval.h
+++ b/eval.h
@@ -62,6 +62,7 @@ class Evaluator {
return rule_vars_;
}
Vars* mutable_vars() { return vars_; }
+ const unordered_map<StringPiece, bool>& exports() const { return exports_; }
void Error(const string& msg);
@@ -78,6 +79,8 @@ class Evaluator {
Vars* vars_;
unordered_map<StringPiece, Vars*> rule_vars_;
vector<shared_ptr<Rule>> rules_;
+ unordered_map<StringPiece, bool> exports_;
+
Rule* last_rule_;
Vars* current_scope_;