Implements inequality token

This commit is contained in:
2019-05-25 14:17:52 +02:00
parent d6a6e116fe
commit 9131fbfee7
8 changed files with 39 additions and 2 deletions

View File

@@ -43,6 +43,15 @@ BooleanEvalValue* Evaluator::EvaluateBooleanBinary(BoundBinaryExpression* expres
delete rightValue;
return new BooleanEvalValue(equals);
}
case BoundBinaryOperation::Inequality:
{
EvalValue* leftValue = this -> EvaluateExpression(expression->GetLeft());
EvalValue* rightValue = this -> EvaluateExpression(expression->GetRight());
bool equals = leftValue->operator!=(rightValue);
delete leftValue;
delete rightValue;
return new BooleanEvalValue(equals);
}
case BoundBinaryOperation::LogicalAnd:
{
BooleanEvalValue* leftValue = this -> EvaluateBoolExpression(expression->GetLeft());