Rework of evaluation variable handling, to account for functions having branching variable states
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
class EvaluationScope {
|
||||
unordered_map<int, shared_ptr<EvalValue>>* _scriptScope;
|
||||
vector<unordered_map<int, shared_ptr<EvalValue>>> _localScope;
|
||||
vector<shared_ptr<unordered_map<int, shared_ptr<EvalValue>>>> _localScope;
|
||||
int _currentScope;
|
||||
public:
|
||||
explicit EvaluationScope(unordered_map<int, shared_ptr<EvalValue>>* scriptVariables, int deepestScope);
|
||||
@@ -20,11 +20,12 @@ public:
|
||||
void InnerScope();
|
||||
shared_ptr<EvalValue> GetVariable(int scope, int id);
|
||||
|
||||
void JumpToScope(int index);
|
||||
EvaluationScope* CreateBranchingScope(int index);
|
||||
|
||||
int GetCurrentScope(){
|
||||
return _currentScope;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user