summary refs log tree commit diff
path: root/src/evaluator.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/evaluator.zig')
-rw-r--r--src/evaluator.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/evaluator.zig b/src/evaluator.zig
index f8bb052..ef83463 100644
--- a/src/evaluator.zig
+++ b/src/evaluator.zig
@@ -93,6 +93,12 @@ pub const Evaluator = struct {
 
                 return try self.get_expression_value(expression orelse return EvaluatorError.EvaluationError);
             },
+            .BINARY => |operation| {
+                //TODO: For now, this just represents sum
+                const lhs = try self.get_expression_value(operation.lhs);
+                const rhs = try self.get_expression_value(operation.rhs);
+                return lhs + rhs;
+            },
         };
     }
 };