From 79c594afa95c8925cc1fd70c3a9c0d022ba3b713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sun, 1 Jan 2023 18:27:33 +0100 Subject: [PATCH] Interpreter - Fixed == operator. Oops. --- src/interpreter/interpretable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpreter/interpretable.rs b/src/interpreter/interpretable.rs index 171f9cf..61cae64 100644 --- a/src/interpreter/interpretable.rs +++ b/src/interpreter/interpretable.rs @@ -205,7 +205,7 @@ impl ast::ExprNode { _ => Err(InterpreterError::new(operator, "type error")), }, - TokenType::Equal => Ok(Value::Boolean(left_value == right_value)), + TokenType::EqualEqual => Ok(Value::Boolean(left_value == right_value)), TokenType::BangEqual => Ok(Value::Boolean(left_value != right_value)), _ => panic!(