diff options
Diffstat (limited to 'src/processor/postfix_evaluator-inl.h')
-rw-r--r-- | src/processor/postfix_evaluator-inl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/processor/postfix_evaluator-inl.h b/src/processor/postfix_evaluator-inl.h index a45a9a08..c78037bc 100644 --- a/src/processor/postfix_evaluator-inl.h +++ b/src/processor/postfix_evaluator-inl.h @@ -47,7 +47,8 @@ class AutoStackClearer { template<typename ValueType> -bool PostfixEvaluator<ValueType>::Evaluate(const string &expression) { +bool PostfixEvaluator<ValueType>::Evaluate(const string &expression, + DictionaryValidityType *assigned) { // Ensure that the stack is cleared before returning. AutoStackClearer clearer(&stack_); @@ -142,6 +143,8 @@ bool PostfixEvaluator<ValueType>::Evaluate(const string &expression) { return false; (*dictionary_)[identifier] = value; + if (assigned) + (*assigned)[identifier] = true; } else { // The token is not an operator, it's a literal value or an identifier. // Push it onto the stack as-is. Use push_back instead of PushValue |