From 5afde3f6d4c9f5ac4c31a150839cb85091d53fea Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 29 Jun 2018 13:01:23 -0400 Subject: [PATCH] Add line numbers to repl like irb. --- src/mainclient/init.dst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainclient/init.dst b/src/mainclient/init.dst index 5eba5d0b..5caab201 100644 --- a/src/mainclient/init.dst +++ b/src/mainclient/init.dst @@ -54,7 +54,8 @@ (do (print (string "Dst " VERSION " Copyright (C) 2017-2018 Calvin Rose")) (repl (fn [buf p] - (def prompt (string (parser.state p) "> ")) + (def [line] (parser.where p)) + (def prompt (string "dst:" line ":" (parser.state p) "> ")) (getline prompt buf)))))) )