diff --git a/LOG.md b/LOG.md index 659ed23..125cbe1 100644 --- a/LOG.md +++ b/LOG.md @@ -129,3 +129,17 @@ serialisations. The printing logic could then be packaged up in an implementation of the Rust standard library's `Display` trait, which is for types that have a textual representation. + +## REPL + +At this point, with the reading and printing implemented, it made +sense to create the REPL logic and demo binary so that a full flow +through the program could be demonstrated. I first created an +`Evaluator` trait to capture the future behaviour of the evaluator, +and then wrote a generic REPL module that's able to work with any +expression type implementing the `FromStr` and `Display` traits. + +I was then able to create a demo program by defining a dummy evaluator +that simply returns the input expression unmodified, and running a +REPL using that, connected to stdin and stdout. This demonstrated a +full round trip through the parsing and printing procedures.