[functional tests] Fix bug in return type of parser-combinators/eof

This commit is contained in:
Joe Thornber 2017-09-14 11:44:01 +01:00
parent 111d64ec9e
commit f756ff02df

View File

@ -322,10 +322,11 @@
(>> (lit str) (pure sym)))
|#
(define (eof s)
(if (zero? (string-length s))
(values #t #t "")
(error-m (dsp "eof expected no input (but there was)"))))
(define eof
(lambda (st)
(if (zero? (string-length (st-input st)))
(values #t st)
(error-m (dsp "eof expected no input (but there was)")))))
;;----------------------------------------------------------------
;; Imperative notation for when the combinators are cumbersome