mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
(chibi parse): Ensure reason is always a string
While testing a `(chibi parser)`-based parser I noticed that `parse-string` is the only provided parser combinator which uses a list, instead of a string, as a failure reason. It is not explicitly documented but since all other standard parser combinator use a string for the error reason I assume this to be a bug and have adjusted the `parse-string` combinator accordingly in this commit.
This commit is contained in:
parent
e7486dd7df
commit
1503217e86
1 changed files with 1 additions and 1 deletions
|
@ -663,7 +663,7 @@
|
|||
(define (parse-string str)
|
||||
(parse-map (parse-with-failure-reason
|
||||
(parse-seq-list (map parse-char (string->list str)))
|
||||
`(expected ,str))
|
||||
(string-append "expected '" str "'"))
|
||||
list->string))
|
||||
|
||||
;;> Parse a sequence of characters matching \var{x} as with
|
||||
|
|
Loading…
Add table
Reference in a new issue