Fix dangling anonymous functions

This commit is contained in:
Sofia 2026-03-16 17:05:11 +02:00
parent 0fca17defb
commit 5162550095

View File

@ -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();