mirror of
https://github.com/janet-lang/janet
synced 2025-01-25 22:56:52 +00:00
Add line numbers to repl like irb.
This commit is contained in:
parent
28cf753fa2
commit
5afde3f6d4
@ -54,7 +54,8 @@
|
|||||||
(do
|
(do
|
||||||
(print (string "Dst " VERSION " Copyright (C) 2017-2018 Calvin Rose"))
|
(print (string "Dst " VERSION " Copyright (C) 2017-2018 Calvin Rose"))
|
||||||
(repl (fn [buf p]
|
(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))))))
|
(getline prompt buf))))))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user