From: David Vazquez Date: Sun, 23 Dec 2012 23:29:10 +0000 (+0000) Subject: Handle unfinished expressions in the REPL X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f413a3f8ea2b855a8c91df72a8ecf6433c664ffd;p=jscl.git Handle unfinished expressions in the REPL --- diff --git a/test.html b/test.html index d0e59cd..eec7048 100644 --- a/test.html +++ b/test.html @@ -76,6 +76,13 @@ } // Restart the prompt. startPrompt(); + }, function(input){ + try { + lisp.read(input[0]==','? input.slice(1): input); + } catch(error) { + return 0; + } + return false; }); }; startPrompt();