Class method AST gen

This commit is contained in:
2026-05-05 21:44:36 +02:00
parent 4837d39ab7
commit 5b0cb74cee
4 changed files with 92 additions and 8 deletions
+6 -5
View File
@@ -79,6 +79,7 @@ pub enum TopLevelKind {
name: String,
fields: Vec<VarDeclStmt>,
constructor: ClassConstructor,
methods: Vec<ClassMethod>,
},
}
@@ -91,11 +92,11 @@ pub struct ClassConstructor {
#[derive(Debug, Clone, Serialize)]
pub struct ClassMethod {
export: bool,
name: String,
params: ParamList,
return_type: TypeExpr,
body: Block,
pub export: bool,
pub name: String,
pub params: ParamList,
pub return_type: TypeExpr,
pub body: Block,
}
#[derive(Debug, Clone, Serialize)]