diff options
Diffstat (limited to 'src/makefile/eval_context.rs')
-rw-r--r-- | src/makefile/eval_context.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/makefile/eval_context.rs b/src/makefile/eval_context.rs index 06f4fbf..ba5f4a0 100644 --- a/src/makefile/eval_context.rs +++ b/src/makefile/eval_context.rs @@ -2,8 +2,7 @@ use eyre::{Result, WrapErr}; use std::io::{BufRead, Cursor}; use std::rc::Rc; -use crate::makefile::input::FinishedMakefileReader; -use crate::makefile::MakefileReader; +use super::{FinishedMakefileReader, MacroSet, MakefileReader}; pub struct DeferredEvalContext<'parent, 'args, 'grandparent, R: BufRead> { parent: &'parent MakefileReader<'args, 'grandparent, R>, @@ -25,9 +24,11 @@ impl<'parent, 'args, 'grandparent, R: BufRead> } pub fn eval(&mut self, to_eval: String) -> Result<()> { - let child_macros = self.parent.macros.with_overlay(); + let child_stack = self.parent.stack.with_scope(&self.parent.macros); + let child_macros = MacroSet::new(); let child = MakefileReader::read( self.parent.args, + child_stack, child_macros, Cursor::new(to_eval), "<eval>", |