summaryrefslogtreecommitdiff
path: root/syntax-highlight/parsers.scm
diff options
context:
space:
mode:
Diffstat (limited to 'syntax-highlight/parsers.scm')
-rw-r--r--syntax-highlight/parsers.scm9
1 files changed, 2 insertions, 7 deletions
diff --git a/syntax-highlight/parsers.scm b/syntax-highlight/parsers.scm
index 712f8d5..31c17ae 100644
--- a/syntax-highlight/parsers.scm
+++ b/syntax-highlight/parsers.scm
@@ -32,7 +32,6 @@
parse-bind
parse-return
parse-lift
- parse-never
parse-map
parse-filter
parse-either
@@ -52,7 +51,7 @@
;;;
(define (parse-fail stream)
- "Return a failed parse value with STREAM as the remainder."
+ "Always fail to parse STREAM without consuming any of it."
(values #f stream))
(define (parse-bind proc parser)
@@ -72,10 +71,6 @@
(lambda args
(parse-return (apply proc args))))
-(define (parse-never stream)
- "Always fail to parse STREAM."
- (parse-fail stream))
-
(define (parse-map proc parser)
"Return a new parser that applies PROC to result of PARSER."
(parse-bind (parse-lift proc) parser))
@@ -114,7 +109,7 @@ FIRST and SECOND if both are successful."
"Create a parser that returns the result of the first successful
parser in PARSERS. This parser fails if no parser in PARSERS
succeeds."
- (fold-right parse-either parse-never parsers))
+ (fold-right parse-either parse-fail parsers))
(define (parse-each . parsers)
"Create a parser that builds a list of the results of PARSERS. This