kurtlawrence / papyrus

(Rust) repl
MIT License
439 stars 14 forks source link

Add `read_str` and `read_input` for repl read stage -- just `push_input` now #9

Closed kurtlawrence closed 5 years ago

kurtlawrence commented 5 years ago

Add ability to read a string straight into the input buffer, moving to the evaluate stage.

kurtlawrence commented 5 years ago

I have mocked up a push_input method that will return repl either in Read or Write stage in 37ee065a0e62a5ca339e064fd3e3cebe4e925e91.

Although I liked this function as it opens up some interesting testing functionality, it does requiring me to fork linefeed to add a small function of my own.

Playing around with the function has shown that the value of it is not as high as I thought and likewise the widget that show papyrus is actually still hamstrung to offloading repls onto another thread. I will detail why on #11