zxul767 / lox

An interpreter for the Lox language
1 stars 0 forks source link

add `:load` command to REPLs (`clox` and `jlox`) #9

Open zxul767 opened 1 year ago

zxul767 commented 1 year ago

the :load command would take a single parameter: the path to a lox source file.

as a bonus, we might configure the line readers in each REPL to autocomplete source files

zxul767 commented 1 year ago

Update: clox now has support for the :load command, which accepts both absolute and relative paths.

zxul767 commented 1 year ago

marked as p0 because jlox doesn't have an implementation yet and it is definitely very painful to debug large programs in jlox otherwise (one can always run the script, but it's not possible to interact in the REPL session that way)