From ee692b360eb410bbd48553ca4cff576c1d4aa1bc Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 16 Feb 2024 11:23:07 -0500 Subject: [PATCH] Implement return for root --- src/abstract_tree/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/abstract_tree/mod.rs b/src/abstract_tree/mod.rs index 40cfbaa..297dc6f 100644 --- a/src/abstract_tree/mod.rs +++ b/src/abstract_tree/mod.rs @@ -113,6 +113,10 @@ impl AbstractTree for Root { for statement in &self.statements { value = statement.run(source, context)?; + + if statement.is_return() { + return Ok(value); + } } Ok(value)