This commit is contained in:
Alex Crichton
2018-02-05 14:24:25 -08:00
parent ec1c263480
commit 8f8da49dab
5 changed files with 251 additions and 62 deletions

View File

@ -6,6 +6,7 @@ pub struct Program {
pub structs: Vec<Struct>,
pub free_functions: Vec<Function>,
pub imports: Vec<(String, Function)>,
pub imported_structs: Vec<ImportStruct>,
}
#[derive(Serialize, Deserialize)]
@ -15,6 +16,13 @@ pub struct Struct {
pub methods: Vec<Method>,
}
#[derive(Serialize, Deserialize)]
pub struct ImportStruct {
pub module: Option<String>,
pub name: String,
pub functions: Vec<(bool, Function)>,
}
#[derive(Serialize, Deserialize)]
pub struct Method {
pub mutable: bool,