replete-repl / replete-ios

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

Can't evaluate multiple forms at once #93

Open aengelberg opened 8 years ago

aengelberg commented 8 years ago

Errors vary wildly depending on input types.

=> () ()
undefined is not an object (evaluating 'cljs.core.List.EMPTYcljs.core') nil
=> 1 2
(1) is not a function. (In '(1)(2)', '(1)' is 1) nil
=> 'a 'b
Unexpected keyword 'new'. Parse error. nil
mfikes commented 8 years ago

Yep. This is probably an easy fix—having it iterate over reading a form, evaluating it, and then proceeding with the remainder.

As an aside, this kind of stuff is fixed in Planck, and there is actually a patch in queue for the official ClojureScript REPL that would fix the same there http://dev.clojure.org/jira/browse/CLJS-1572

Dunno why I never thought to try this in Replete :)