Syntax: fn type name

This commit is contained in:
2026-06-16 03:29:01 +02:00
parent eea72f5bb3
commit aadccb7f38
15 changed files with 9 additions and 842 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ trait_decl = {
override_kw = { "override" ~ ("(" ~ expr_path ~ ")")? }
function_decl = {
visibility? ~ override_kw? ~ "fn" ~ identifier ~ generics_decl? ~ "(" ~ method_args ~ ")" ~ type_expr? ~ (block | semicolon)
visibility? ~ override_kw? ~ "fn" ~ ("void" | type_expr) ~ identifier ~ generics_decl? ~ "(" ~ method_args ~ ")" ~ (block | semicolon)
}
// ======================================================