#ifndef PORYGONLANG_BOUNDSCOPE_HPP #define PORYGONLANG_BOUNDSCOPE_HPP #include #include #include #include "BoundVariable.hpp" #include "BoundVariableKey.hpp" #include "VariableAssigmentResult.hpp" #include "../../Utilities/HashedString.hpp" using namespace std; class BoundScope { unordered_map* _scriptScope; vector*> _localScope; int _currentScope; int _deepestScope; public: explicit BoundScope(unordered_map *scriptScope); ~BoundScope(); void GoInnerScope(); void GoOuterScope(); int Exists(int key); BoundVariable* GetVariable(int scope, int identifier); VariableAssignment CreateExplicitLocal(int identifier, const ScriptType& type); VariableAssignment AssignVariable(int identifier, const ScriptType& type); }; #endif //PORYGONLANG_BOUNDSCOPE_HPP