AST and codegen

This commit is contained in:
2026-05-10 17:08:58 +02:00
parent 22b1b377f3
commit 81d0286226
2 changed files with 40 additions and 3 deletions
+9
View File
@@ -74,6 +74,7 @@ pub enum TopLevelKind {
ModAttribute,
Import(Path),
Mod(Identifier),
ImplDecl(ImplDecl),
EnumDecl {
visibility: Visibility,
name: Identifier,
@@ -192,6 +193,14 @@ pub enum Statement {
Continue,
}
#[derive(Debug, Clone, Serialize)]
pub struct ImplDecl {
pub generics: Generics,
pub target: TypeExpr,
pub trait_: Option<TypeExpr>,
pub methods: Vec<FunctionDecl>,
}
#[derive(Debug, Clone, Serialize)]
pub struct VarDecl {
pub mutable: bool,