diff options
Diffstat (limited to 'src/makefile/macro.rs')
-rw-r--r-- | src/makefile/macro.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index 301173a..b2a1510 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -119,7 +119,8 @@ impl Set { } } - pub fn get(&self, name: &str) -> Option<&Macro> { + /// To properly process inherited macros, use [MacroScopeStack::get]. + pub fn get_non_recursive(&self, name: &str) -> Option<&Macro> { self.data.get(name) } @@ -127,17 +128,6 @@ impl Set { self.data.insert(name, r#macro); } - #[cfg(feature = "full")] - pub fn is_defined(&self, name: &str) -> bool { - self.get(name).map_or(false, |x| !x.text.is_empty()) - } - - // `remove` is fine, but I think for "remove-and-return" `pop` is better - pub fn pop(&mut self, name: &str) -> Option<Macro> { - // TODO figure out a better way to handle inheritance - self.data.remove(name) - } - pub fn extend( &mut self, other: HashMap<String, Macro>, |