diff options
Diffstat (limited to 'eval.h')
-rw-r--r-- | eval.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -15,6 +15,7 @@ #ifndef EVAL_H_ #define EVAL_H_ +#include <memory> #include <unordered_map> #include <unordered_set> #include <vector> @@ -98,6 +99,16 @@ class Evaluator { } void DumpStackStats() const; + bool ExportDeprecated() const { return export_message_ && !export_error_; }; + bool ExportObsolete() const { return export_error_; }; + void SetExportDeprecated(StringPiece msg) { + export_message_.reset(new string(msg.as_string())); + } + void SetExportObsolete(StringPiece msg) { + export_message_.reset(new string(msg.as_string())); + export_error_ = true; + } + private: Var* EvalRHS(Symbol lhs, Value* rhs, @@ -139,6 +150,9 @@ class Evaluator { void* lowest_stack_; Loc lowest_loc_; + unique_ptr<string> export_message_; + bool export_error_; + static unordered_set<Symbol> used_undefined_vars_; Symbol kati_readonly_; |