50e922024f5508d9dc8e29f355db5ce7026bbec7 — Phil Hagelberg 4 months ago 8a8bb67
Use pcall when compiling lua equivalent for the panel.

This fixes #21, but not in a great way; it would be better to pass the
real scope into the call to compileString.
1 files changed, 3 insertions(+), 2 deletions(-)

M repl.fnl
M repl.fnl => repl.fnl +3 -2
@@ 84,8 84,9 @@
                      :readChunk (fn []
                                   (let [input (coroutine.yield)]
                                     (set last-input input)
                                     (printLuacode (fennel.compileString input {:useMetadata true
                                                                                :moduleName "fennel/fennel"}))
                                     ;; TODO: pass scope in here somehow
                                      (pcall fennel.compileString input))
                                     (print (.. "> " input))
                                     (.. input "\n")))
                      :onValues (fn [xs]