Implements setting table values
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-06-14 17:12:27 +02:00
parent 996b5be496
commit a9def6c539
14 changed files with 141 additions and 15 deletions

View File

@@ -22,16 +22,16 @@ public:
virtual shared_ptr<EvalValue> Clone() = 0;
virtual long EvaluateInteger(){
virtual long EvaluateInteger() const{
throw EvaluationException("Can't evaluate this EvalValue as integer.");
}
virtual double EvaluateFloat(){
virtual double EvaluateFloat() const{
throw EvaluationException("Can't evaluate this EvalValue as float.");
}
virtual bool EvaluateBool(){
virtual bool EvaluateBool() const{
throw EvaluationException("Can't evaluate this EvalValue as bool.");
}
virtual std::string* EvaluateString(){
virtual const std::string* EvaluateString() const {
throw EvaluationException("Can't evaluate this EvalValue as string.");
}
@@ -40,6 +40,10 @@ public:
virtual shared_ptr<EvalValue> IndexValue(EvalValue* val){
throw EvaluationException("Can't index this EvalValue");
}
virtual void SetIndexValue(EvalValue *key, shared_ptr<EvalValue> value){
throw EvaluationException("Can't index this EvalValue");
}
};
class BooleanEvalValue : public EvalValue{
@@ -58,7 +62,7 @@ public:
return TypeClass ::Bool;
}
bool EvaluateBool() final{
bool EvaluateBool() const final{
return _value;
}