Class codegen

This commit is contained in:
2026-05-05 18:58:14 +02:00
parent f01b9debe2
commit cf99ef58c3
3 changed files with 61 additions and 1 deletions
+7 -1
View File
@@ -225,9 +225,15 @@ impl From<pest::iterators::Pair<'_, Rule>> for ClassConstructor {
false
};
let params = if inner.peek().unwrap().as_rule() == Rule::param_list {
ParamList::from(inner.next().unwrap())
} else {
ParamList(Vec::new())
};
Self {
export,
params: ParamList::from(inner.next().unwrap()),
params,
body: Block::from(inner.next().unwrap()),
}
}