Allow only one return statement

This commit is contained in:
2025-05-17 23:12:44 +02:00
parent 573d812f1c
commit 8206b48dbd
6 changed files with 69 additions and 91 deletions

View File

@ -252,10 +252,7 @@ namespace elna::boot
void declaration_visitor::visit(return_statement *statement)
{
if (statement->return_expression != nullptr)
{
statement->return_expression->accept(this);
}
statement->return_expression().accept(this);
}
void declaration_visitor::visit(defer_statement *statement)