More generics

This commit is contained in:
2026-05-08 17:09:01 +02:00
parent ed4a505a6a
commit bbcc639331
4 changed files with 27 additions and 11 deletions
+3 -3
View File
@@ -204,7 +204,7 @@ enum_fields = _{
}
enum_decl = {
export? ~ "enum" ~ identifier ~ "{" ~ enum_fields ~ "}"
export? ~ "enum" ~ identifier ~ generics? ~ "{" ~ enum_fields ~ "}"
}
// ======================================================
@@ -224,11 +224,11 @@ self_param = {
}
method = {
export? ~ type_expr ~ identifier ~ "(" ~ self_param? ~ param_list? ~ ")" ~ block
export? ~ type_expr ~ identifier ~ generics? ~ "(" ~ self_param? ~ param_list? ~ ")" ~ block
}
class_decl = {
export? ~ "class" ~ identifier ~ "{" ~ class_fields ~ class_constructor ~ method* ~ "}"
export? ~ "class" ~ identifier ~ generics? ~ "{" ~ class_fields ~ class_constructor ~ method* ~ "}"
}
// ======================================================