mirror of
https://github.com/janet-lang/janet
synced 2025-01-11 16:10:27 +00:00
Add line numbers to repl like irb.
This commit is contained in:
parent
28cf753fa2
commit
5afde3f6d4
@ -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))))))
|
||||
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user