mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-25 18:49:50 -04:00
Callapse with below.
This commit is contained in:
parent
b56fb25c28
commit
b51231b3cb
@ -322,12 +322,14 @@ impl<'a> FileBuilder<'a> {
|
|||||||
self.eval_input(OffsetStrIter::new(input))
|
self.eval_input(OffsetStrIter::new(input))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FileBuilder specific
|
||||||
/// Builds a ucg file at the named path.
|
/// Builds a ucg file at the named path.
|
||||||
pub fn build(&mut self) -> BuildResult {
|
pub fn build(&mut self) -> BuildResult {
|
||||||
let mut f = File::open(&self.file)?;
|
let mut f = File::open(&self.file)?;
|
||||||
let mut s = String::new();
|
let mut s = String::new();
|
||||||
f.read_to_string(&mut s)?;
|
f.read_to_string(&mut s)?;
|
||||||
let eval_result = self.eval_string(&s);
|
let input = OffsetStrIter::new(&s).with_src_file(self.file.clone());
|
||||||
|
let eval_result = self.eval_input(input);
|
||||||
match eval_result {
|
match eval_result {
|
||||||
Ok(v) => {
|
Ok(v) => {
|
||||||
self.last = Some(v);
|
self.last = Some(v);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user