stefanobaghino / lox-interpreter

Interpreter for Lox (https://craftinginterpreters.com) written in Go
0 stars 0 forks source link

Allow statements and expressions in the REPL #32

Closed stefanobaghino closed 6 months ago

stefanobaghino commented 1 year ago

The REPL no longer supports entering a single expression and automatically printing its result value. That’s a drag. Add support to the REPL to let users type in both statements and expressions. If they enter a statement, execute it. If they enter an expression, evaluate it and display the result value.

-- https://craftinginterpreters.com/statements-and-state.html#challenges