Implements unary operation evaluation
This commit is contained in:
@@ -41,6 +41,7 @@ NumericEvalValue* Evaluator::EvaluateIntegerExpression(BoundExpression *expressi
|
||||
switch (expression->GetKind()){
|
||||
case BoundExpressionKind ::LiteralInteger: return new IntegerEvalValue(((BoundLiteralIntegerExpression*)expression)->GetValue());
|
||||
case BoundExpressionKind ::LiteralFloat: return new FloatEvalValue(((BoundLiteralFloatExpression*)expression)->GetValue());
|
||||
case BoundExpressionKind::Unary: return this -> EvaluateIntegerUnary((BoundUnaryExpression*)expression);
|
||||
case BoundExpressionKind ::Binary: return this -> EvaluateIntegerBinary((BoundBinaryExpression*)expression);
|
||||
|
||||
case BoundExpressionKind ::LiteralString:
|
||||
@@ -53,7 +54,7 @@ NumericEvalValue* Evaluator::EvaluateIntegerExpression(BoundExpression *expressi
|
||||
BooleanEvalValue* Evaluator::EvaluateBoolExpression(BoundExpression *expression) {
|
||||
switch (expression->GetKind()) {
|
||||
case BoundExpressionKind::LiteralBool: return new BooleanEvalValue(((BoundLiteralBoolExpression*)expression)->GetValue());
|
||||
case BoundExpressionKind::Unary:break;
|
||||
case BoundExpressionKind::Unary: return this -> EvaluateBooleanUnary((BoundUnaryExpression*)expression);
|
||||
case BoundExpressionKind::Binary: return this -> EvaluateBooleanBinary((BoundBinaryExpression*)expression);
|
||||
case BoundExpressionKind::Bad:
|
||||
case BoundExpressionKind::LiteralInteger:
|
||||
|
||||
Reference in New Issue
Block a user