Update: Closures #64

This commit is contained in:
2026-06-05 18:51:55 +02:00
parent 765e2ded93
commit a9eb77f158
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -453,7 +453,10 @@ match_stmt = {
// CLOSURES
// ------------------------------------------------------
closure = { type_expr? ~ "fn" ~ "(" ~ param_list ~ ")" ~ expr }
closure = {
"fn" ~ "(" ~ param_list ~ ")" ~ type_expr? ~ block
| "fn" ~ "(" ~ param_list ~ ")" ~ type_expr? ~ "->" ~ expr
}
// ------------------------------------------------------
// TUPLES & ARRAYS