golo-lang icon indicating copy to clipboard operation
golo-lang copied to clipboard

REPL

Open yloiseau opened this issue 11 years ago • 2 comments

It would be awesome to have a REPL (read eval print loop, i.e. an interactive interpreter) for Golo.

For simple single-line expressions, a simple while true readln + EvaluationEnvironment.run could do the trick, but being able to define functions, structures and augments in this top level repl would be very valuable.

yloiseau avatar Nov 09 '14 08:11 yloiseau

Oh yes, that would be great :-)

jponge avatar Nov 09 '14 22:11 jponge

I’ve already done some tests, but it’s a lot less obvious than it first seems…

  • an anonymous module must be built incrementally
  • the main should be to just print the evaluation of the entered expression, of update the module if it is a declaration
  • the reader should be contextual, since we would like to be able to enter a definition expression spanning several lines

yloiseau avatar Nov 10 '14 10:11 yloiseau