aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/macro.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-03 13:42:49 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-03 13:42:49 -0600
commit94049a42a0f61ab9f3ec7a0ea109a2e0ac9edfcc (patch)
treee1252c7ba2b863fec75469de25b898199c19cc23 /src/makefile/macro.rs
parent101c96b03ecf180af986bc20b7161b0933ae47cf (diff)
downloadmakers-94049a42a0f61ab9f3ec7a0ea109a2e0ac9edfcc.tar.gz
makers-94049a42a0f61ab9f3ec7a0ea109a2e0ac9edfcc.zip
correctly inherit macros
Diffstat (limited to 'src/makefile/macro.rs')
-rw-r--r--src/makefile/macro.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs
index a1f2378..310994d 100644
--- a/src/makefile/macro.rs
+++ b/src/makefile/macro.rs
@@ -28,7 +28,7 @@ impl<F: for<'a> Fn(&'a str) -> Result<String>> LookupInternal for F {}
#[derive(Clone)]
pub struct Set<'parent, 'lookup> {
parent: Option<&'parent Set<'parent, 'lookup>>,
- data: HashMap<String, (Source, TokenString)>,
+ pub data: HashMap<String, (Source, TokenString)>,
lookup_internal: Option<&'lookup dyn LookupInternal>,
#[cfg(feature = "full")]
pub to_eval: Rc<RefCell<Vec<String>>>,
@@ -93,8 +93,8 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> {
self.data.remove(name)
}
- pub fn extend(&mut self, other: Set) {
- self.data.extend(other.data);
+ pub fn extend(&mut self, other: HashMap<String, (Source, TokenString)>) {
+ self.data.extend(other);
}
pub fn expand(&self, text: &TokenString) -> Result<String> {