Skip to content

Commit

Permalink
Evaluate load argument in lisp
Browse files Browse the repository at this point in the history
  • Loading branch information
vinc committed Jul 29, 2023
1 parent cd41710 commit f21a0c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usr/lisp/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn eval_do_args(args: &[Exp], env: &mut Rc<RefCell<Env>>) -> Result<Exp, Err> {

fn eval_load_args(args: &[Exp], env: &mut Rc<RefCell<Env>>) -> Result<Exp, Err> {
ensure_length_eq!(args, 1);
let path = string(&args[0])?;
let path = string(&eval(&args[0], env)?)?;
let mut input = fs::read_to_string(&path).or(could_not!("find file '{}'", path))?;
loop {
let (rest, _) = parse_eval(&input, env)?;
Expand Down

0 comments on commit f21a0c1

Please sign in to comment.