diff --git a/src/ast.rs b/src/ast.rs index 63029f4..87e39bc 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -16,11 +16,18 @@ pub struct FunDecl { pub body: Vec, } +/// The declaration of a class member. +#[derive(Debug, Clone)] +pub enum ClassMemberDecl { + Method(FunDecl), + StaticMethod(FunDecl), +} + /// A class declaration. #[derive(Debug, Clone)] pub struct ClassDecl { pub name: Token, - pub methods: Vec, + pub members: Vec, } /// An AST node that represents a statement.