Rework of variable scope to reduce load on evaluator
This commit is contained in:
@@ -134,13 +134,11 @@ public:
|
||||
};
|
||||
|
||||
class BoundVariableExpression : public BoundExpression{
|
||||
int _scope;
|
||||
int _id;
|
||||
BoundVariableKey* _key;
|
||||
public:
|
||||
BoundVariableExpression(int scope, int id, shared_ptr<ScriptType> type, unsigned int start, unsigned int length)
|
||||
BoundVariableExpression(BoundVariableKey* key, shared_ptr<ScriptType> type, unsigned int start, unsigned int length)
|
||||
: BoundExpression(start, length, std::move(type)){
|
||||
_scope = scope;
|
||||
_id = id;
|
||||
_key = key;
|
||||
}
|
||||
|
||||
~BoundVariableExpression() override = default;
|
||||
@@ -149,12 +147,8 @@ public:
|
||||
return BoundExpressionKind ::Variable;
|
||||
}
|
||||
|
||||
int GetScope(){
|
||||
return _scope;
|
||||
}
|
||||
|
||||
int GetId(){
|
||||
return _id;
|
||||
BoundVariableKey* GetKey(){
|
||||
return _key;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user