replete-repl / replete-ios

ClojureScript REPL iOS app
Eclipse Public License 1.0
395 stars 25 forks source link

Implement `source` #56

Closed mfikes closed 5 years ago

mfikes commented 9 years ago

This could be done as a Replete REPL special form just like doc is implemented, consulting the meta and perhaps delegating to the Obj-C side to have the relevant lines read off the device filesystem so that they can be displayed in the REPL.

mfikes commented 9 years ago

It looks like the :end-line meta is the same as :line. So, the solution could take the same form as the regular REPL: The entire source file is read in, skipping all of the lines prior to :line and then the reader is used to read the first form at that point.