mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
FIX: Include source file for parsing/build errors in the std lib.
This commit is contained in:
parent
76e8510f15
commit
0e2e396ac3
@ -398,7 +398,10 @@ impl<'a> FileBuilder<'a> {
|
||||
Some(v) => v.clone(),
|
||||
None => {
|
||||
let mut b = self.clone_builder();
|
||||
b.eval_string(self.std.get(&def.path.fragment).unwrap())?;
|
||||
b.eval_input(
|
||||
OffsetStrIter::new(self.std.get(&def.path.fragment).unwrap())
|
||||
.with_src_file(&def.path.fragment),
|
||||
)?;
|
||||
b.get_outputs_as_val()
|
||||
}
|
||||
};
|
||||
|
@ -30,8 +30,8 @@ impl<'a> OffsetStrIter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_src_file(mut self, file: PathBuf) -> Self {
|
||||
self.source_file = Some(file);
|
||||
pub fn with_src_file<P: Into<PathBuf>>(mut self, file: P) -> Self {
|
||||
self.source_file = Some(file.into());
|
||||
self
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user