diff options
Diffstat (limited to 'main.lisp')
| -rw-r--r-- | main.lisp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,12 +1,12 @@ (in-package #:monparser) +(declaim (ftype (function (parser string) result) parse)) (defun parse (parser data) - (if (typep data 'string) - (funcall parser - (make-instance 'text :data data) - (make-instance 'text :data data)) - (error "Only string parsing is allowed."))) + (funcall parser + (make-instance 'cursor :data data) + (make-instance 'cursor :data data))) +(declaim (ftype (function (parser string) parser) append-on-failure)) (defun append-on-failure (p message) (lambda (start input) (let ((result (funcall p start input))) |
