Class AST gen

This commit is contained in:
2026-05-05 18:41:08 +02:00
parent 1f7db7ff1a
commit f01b9debe2
2 changed files with 53 additions and 1 deletions
+8 -1
View File
@@ -78,10 +78,17 @@ pub enum TopLevelKind {
export: bool,
name: String,
fields: Vec<VarDeclStmt>,
constructor: (ParamList, Block),
constructor: ClassConstructor,
},
}
#[derive(Debug, Clone, Serialize)]
pub struct ClassConstructor {
pub export: bool,
pub params: ParamList,
pub body: Block,
}
#[derive(Debug, Clone, Serialize)]
pub enum Postfix {
FieldAccess(String),