This commit is contained in:
2026-05-10 18:08:15 +02:00
parent e063d4c685
commit 380755bf83
4 changed files with 44 additions and 27 deletions
+2 -8
View File
@@ -80,7 +80,7 @@ pub enum TopLevelKind {
name: Identifier,
generics: Generics,
requirements: Vec<TypeExpr>,
items: Vec<TraitItem>,
items: Vec<FunctionDecl>,
},
EnumDecl {
visibility: Visibility,
@@ -105,12 +105,6 @@ pub enum TopLevelKind {
},
}
#[derive(Debug, Clone, Serialize)]
pub enum TraitItem {
WithBody(FunctionDecl),
NoBody(FunctionDecl),
}
#[derive(Debug, Clone, Serialize)]
pub enum ClassItem {
Method(FunctionDecl),
@@ -158,7 +152,7 @@ pub struct FunctionDecl {
pub generics: Generics,
pub params: ParamList,
pub return_type: TypeExpr,
pub body: Block,
pub body: Option<Block>,
}
#[derive(Debug, Clone, Serialize)]