Add repl dedicated features
- [ ] (repl:toFile filename) to store the expressions (+ results in comments) in a given file
- [ ] (repl:reset) to reset the VM state and start from something fresh
- [ ] consider key bindings
There is so much more we can do by using replxx, eg https://github.com/AmokHuginnsson/replxx/blob/master/examples/cxx-api.cxx
Hello! I'm interested in this issue.
(repl:toFile filename) to store the expressions (+ results in comments) in a given file This should store the expression written so far in the runtime, quite like a log? Should there be any special formatting for the expressions and the results, so a further parsing is able to be done?
consider key bindings What kind of key bindings should be implemented?
This should store the expression written so far in the runtime, quite like a log? Should there be any special formatting for the expressions and the results, so a further parsing is able to be done?
Aside from using the internal REPL buffer storing the code to be executed, and adding the generated results (outputed to the terminal, if we can find an easy way to retrieve that output without modifying anything else than the REPL) as comments (starting with # in the language), I don't think we need to add anything more (timestamps on queries are a bit useless for a language like this one, if it was a query language like SQL, it would have been interesting/required).
What kind of key bindings should be implemented?
At the time of writing this, I didn't have a clear idea in mind, it was more like "explore what we can do with it", in term of text completion, searching for code/snippets, etc