generics parsing and AST

This commit is contained in:
2026-05-08 16:48:31 +02:00
parent 630528a843
commit 205e2d9fd3
3 changed files with 41 additions and 13 deletions
+4
View File
@@ -81,6 +81,7 @@ pub enum TopLevelKind {
},
StructDecl {
visibility: Visibility,
generics: Generics,
name: Identifier,
fields: FieldList,
},
@@ -94,6 +95,9 @@ pub enum TopLevelKind {
},
}
#[derive(Debug, Clone, Serialize)]
pub struct Generics(pub Vec<(Identifier, Vec<Path>)>);
#[derive(Debug, Clone, Serialize)]
pub enum Pattern {
NamedTuple(Path, Vec<Identifier>),