summaryrefslogtreecommitdiff
path: root/src/types.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-03-23 23:59:15 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-03-23 23:59:32 +0100
commitaa9bd918772039e45a7e2ff5f90a36488776af4c (patch)
treebd2ea0f7d65f100c4644af63b7652896fbe8cfcf /src/types.rs
parenta624bc81095df028859f0982b80881dc6cd38e28 (diff)
gen: Add option to replace types via annotations
This is limited to the same namespace, but well, it seems useful enough.
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.rs b/src/types.rs
index 792965c2..925efdbf 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -32,6 +32,9 @@ pub struct Module {
pub parent_id: Option<ModuleId>,
// Just for convenience
pub children_ids: Vec<ModuleId>,
+ /// Types that must be substituted in this module,
+ /// in the form original_name -> substituted_type
+ pub translations: HashMap<String, Global>,
}
impl Module {
@@ -41,6 +44,7 @@ impl Module {
globals: vec![],
parent_id: parent_id,
children_ids: vec![],
+ translations: HashMap::new(),
}
}