brundonsmith / rust_lisp

A Rust-embeddable Lisp, with support for interop with native Rust functions
239 stars 19 forks source link

REPL fix & smol refactors #8

Closed alexmozaidze closed 2 years ago

alexmozaidze commented 2 years ago

I did smol (opinionated) refactoring. I kind of only wanted to fix the REPL thing where it errors out upon pressing Ctrl-D, which is not supposed to happen since Ctrl-D is for terminating, but I ended up refactoring some code.

The explicit Rc clones is there because I think it makes incrementing the reference counter more explicit, but it's just my opinion, I'll remove it if you think it's not needed.

alexmozaidze commented 2 years ago

Wait, I think I found a bug with the REPL. It doesn't properly go to the next line when you give it some weird input like the arrow keys.

alexmozaidze commented 2 years ago

Closing. I'll do a bigger PR where I improve string parsing and I'll then include these changes too.

alexmozaidze commented 2 years ago

I thought maybe reopening PR would add new commits automatically, apparently not :/