From f9f28a54d7258070b97998c3478a1a44b670fbf1 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 4 Mar 2024 23:12:40 -0800 Subject: [PATCH] Parser tweak --- src/board/tree.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/board/tree.rs b/src/board/tree.rs index b6ba662..602c42c 100644 --- a/src/board/tree.rs +++ b/src/board/tree.rs @@ -93,7 +93,8 @@ impl TreeElement { pub fn evaluate(&self) -> Option { match self { Self::Number(x) => Some(*x), - Self::Partial(_) => None, + // Try to parse strings of a partial + Self::Partial(s) => s.parse().ok(), Self::Add { l, r } => { let l = l.evaluate(); let r = r.evaluate();