From b5e6c0b8fc698820df2efef4bff0ff78ebf4e087 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Wed, 22 May 2019 23:56:59 -0400 Subject: [PATCH] Address #109 Make repl work when default chunks not supplied. --- src/boot/boot.janet | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 53ab18a6..af41c06b 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -1472,7 +1472,7 @@ :compile-only compile-only :source where} opts) (default env (fiber/getenv (fiber/current))) - (default chunks getline) + (default chunks (fn [buf p] (getline "" buf))) (default compile-only false) (default onstatus debug/stacktrace) (default on-compile-error bad-compile) @@ -1754,6 +1754,11 @@ [&opt chunks onsignal env] (def level (+ (dyn :debug-level 0) 1)) (default env (make-env)) + (default chunks (fn [buf p] (getline (string "repl:" + (parser/where p) + ":" + (parser/state p) "> ") + buf))) (default onsignal (fn [f x] (case (fiber/status f) :dead (do