1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-11 19:18:07 +00:00

Add support for getting more detailed parser state

This commit is contained in:
Adam Schwalm
2019-06-10 21:33:09 -05:00
parent 6225f8d334
commit 3bbc121c6a
3 changed files with 157 additions and 26 deletions

View File

@@ -80,7 +80,7 @@
(defn noprompt [_] "")
(defn getprompt [p]
(def offset (parser/where p))
(string "janet:" offset ":" (parser/state p) "> "))
(string "janet:" offset ":" (parser/state p :delimiters) "> "))
(def prompter (if *quiet* noprompt getprompt))
(defn getstdin [prompt buf]
(file/write stdout prompt)