traits
This commit is contained in:
+2
-8
@@ -80,7 +80,7 @@ pub enum TopLevelKind {
|
||||
name: Identifier,
|
||||
generics: Generics,
|
||||
requirements: Vec<TypeExpr>,
|
||||
items: Vec<TraitItem>,
|
||||
items: Vec<FunctionDecl>,
|
||||
},
|
||||
EnumDecl {
|
||||
visibility: Visibility,
|
||||
@@ -105,12 +105,6 @@ pub enum TopLevelKind {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub enum TraitItem {
|
||||
WithBody(FunctionDecl),
|
||||
NoBody(FunctionDecl),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub enum ClassItem {
|
||||
Method(FunctionDecl),
|
||||
@@ -158,7 +152,7 @@ pub struct FunctionDecl {
|
||||
pub generics: Generics,
|
||||
pub params: ParamList,
|
||||
pub return_type: TypeExpr,
|
||||
pub body: Block,
|
||||
pub body: Option<Block>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user