Implements variable usage, tweaks and fixes for variable assignment

This commit is contained in:
2019-05-30 15:23:48 +02:00
parent 257eb942c7
commit 6fad5a0a7d
17 changed files with 145 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
class EvalValue{
public:
EvalValue() = default;
virtual ~EvalValue() = default;
virtual ScriptType* GetType() = 0;
@@ -18,6 +19,8 @@ public:
return ! (this->operator==(b));
}
virtual EvalValue* Clone() = 0;
virtual long EvaluateInteger(){
throw EvaluationException("Can't evaluate this EvalValue as integer.");
}
@@ -41,6 +44,10 @@ public:
_type = new ScriptType(TypeClass::Bool);
}
EvalValue* Clone() final{
return new BooleanEvalValue(_value);
}
~BooleanEvalValue() final{
delete _type;
}