Added namespaces to most classes, general cleanup
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-06-17 18:35:12 +02:00
parent 21d3329c55
commit fde102d954
66 changed files with 4301 additions and 3909 deletions

View File

@@ -5,18 +5,24 @@
#include <unordered_map>
#include <vector>
#include "../EvalValues/EvalValue.hpp"
using namespace Porygon::Binder;
class EvaluationScope {
unordered_map<uint32_t, shared_ptr<EvalValue>>* _scriptScope;
unordered_map<uint64_t, shared_ptr<EvalValue>> _localScope;
public:
explicit EvaluationScope(unordered_map<uint32_t, shared_ptr<EvalValue>>* scriptVariables, int deepestScope);
~EvaluationScope() = default;
namespace Porygon::Evaluation {
class EvaluationScope {
unordered_map<uint32_t, shared_ptr<EvalValue>> *_scriptScope;
unordered_map<uint64_t, shared_ptr<EvalValue>> _localScope;
public:
explicit EvaluationScope(unordered_map<uint32_t, shared_ptr<EvalValue>> *scriptVariables, int deepestScope);
void CreateVariable(const BoundVariableKey* key, const shared_ptr<EvalValue>& value);
void SetVariable(const BoundVariableKey* key, const shared_ptr<EvalValue>& value);
shared_ptr<EvalValue> GetVariable(const BoundVariableKey* key);
};
~EvaluationScope() = default;
void CreateVariable(const BoundVariableKey *key, const shared_ptr<EvalValue> &value);
void SetVariable(const BoundVariableKey *key, const shared_ptr<EvalValue> &value);
shared_ptr<EvalValue> GetVariable(const BoundVariableKey *key);
};
}
#endif //PORYGONLANG_EVALUATIONSCOPE_HPP