-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored trait methods AST representation to be included in trait AST
- Loading branch information
1 parent
63747d1
commit 581f371
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
use super::Privacy; | ||
use super::{Parameters, Privacy, Type}; | ||
use crate::source_files::Source; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct Trait { | ||
pub name: String, | ||
pub source: Source, | ||
pub privacy: Privacy, | ||
pub methods: Vec<TraitMethod>, | ||
} | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct TraitMethod { | ||
pub name: String, | ||
pub parameters: Parameters, | ||
pub return_type: Type, | ||
pub source: Source, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters