Added logical and and or binary operations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user