#ifndef PORYGONLANG_EVALUATIONSCOPE_HPP #define PORYGONLANG_EVALUATIONSCOPE_HPP #include #include #include "../EvalValues/EvalValue.hpp" class EvaluationScope { unordered_map>* _scriptScope; vector>> _localScope; int _currentScope; public: explicit EvaluationScope(unordered_map>* scriptVariables, int deepestScope); ~EvaluationScope() = default; void CreateVariable(int scope, int id, const shared_ptr& value); void SetVariable(int scope, int id, const shared_ptr& value); void OuterScope(); void InnerScope(); shared_ptr GetVariable(int scope, int id); void JumpToScope(int index); int GetCurrentScope(){ return _currentScope; } }; #endif //PORYGONLANG_EVALUATIONSCOPE_HPP