Class impl

This commit is contained in:
2026-05-10 17:35:33 +02:00
parent bb9ad547a3
commit 28d4d784f2
4 changed files with 53 additions and 9 deletions
+7 -1
View File
@@ -94,10 +94,16 @@ pub enum TopLevelKind {
generics: Generics,
fields: Vec<FieldDeclStmt>,
constructor: ClassConstructor,
items: Vec<FunctionDecl>,
items: Vec<ClassItem>,
},
}
#[derive(Debug, Clone, Serialize)]
pub enum ClassItem {
Method(FunctionDecl),
ImplDecl(ImplDecl),
}
#[derive(Debug, Clone, Serialize, Default)]
pub struct Generics(pub Vec<Generic>);