1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-23 13:43:16 +00:00

Add line numbers to repl like irb.

This commit is contained in:
Calvin Rose 2018-06-29 13:01:23 -04:00
parent 28cf753fa2
commit 5afde3f6d4

View File

@ -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))))))
)