diff --git a/src/Evaluator/EvaluationScope/EvaluationScope.cpp b/src/Evaluator/EvaluationScope/EvaluationScope.cpp index 1e40e09..2d30864 100644 --- a/src/Evaluator/EvaluationScope/EvaluationScope.cpp +++ b/src/Evaluator/EvaluationScope/EvaluationScope.cpp @@ -10,15 +10,21 @@ EvaluationScope::EvaluationScope(unordered_map> *scri void EvaluationScope::CreateVariable(int scope, int id, shared_ptr value) { if (scope == 0){ +#if defined(__GNUC__) _scriptScope->insert_or_assign(id, value); +#endif } else{ +#if defined(__GNUC__) _localScope[scope - 1].insert_or_assign(id, value); +#endif } } void EvaluationScope::SetVariable(int scope, int id, shared_ptr value) { if (scope == 0){ +#if defined(__GNUC__) _scriptScope->insert_or_assign(id, value); +#endif } else{ _localScope[scope - 1][id] = value; }