Added logical and and or binary operations

This commit is contained in:
2019-05-25 13:30:20 +02:00
parent ce3be6a039
commit 4a4a71ca73
5 changed files with 140 additions and 7 deletions

View File

@@ -25,4 +25,26 @@ public:
}
};
class BooleanEvalValue : public EvalValue{
bool _value;
ScriptType* _type;
public:
explicit BooleanEvalValue(bool val){
_value = val;
_type = new ScriptType(TypeClass::Bool);
}
~BooleanEvalValue() final{
delete _type;
}
ScriptType* GetType() final{
return _type;
};
bool EvaluateBool() final{
return _value;
}
};
#endif //PORYGONLANG_EVALVALUE_HPP