[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))) (>> (lit str) (pure sym)))
|# |#
(define (eof s) (define eof
(if (zero? (string-length s)) (lambda (st)
(values #t #t "") (if (zero? (string-length (st-input st)))
(error-m (dsp "eof expected no input (but there was)")))) (values #t st)
(error-m (dsp "eof expected no input (but there was)")))))
;;---------------------------------------------------------------- ;;----------------------------------------------------------------
;; Imperative notation for when the combinators are cumbersome ;; Imperative notation for when the combinators are cumbersome