From 5162550095d6c51516a7a33573fe42693735531e Mon Sep 17 00:00:00 2001 From: Sofia Date: Mon, 16 Mar 2026 17:05:11 +0200 Subject: [PATCH] Fix dangling anonymous functions --- src/ast.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ast.rs b/src/ast.rs index ed2b322..f6f8312 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -230,7 +230,10 @@ impl Parse for Statement { }]), )) } else { - todo!() + Ok(Self::Expression(Node { + kind: Expression::FunctionDefinition(function.kind.params, function.kind.block), + meta: function.meta, + })) } } else if peeked == Some(Token::Keyword(Keyword::Return)) { stream.next();