(scanner-step scanner)))
(defun parse-error-recover (scanner parser recover
- &key ignore-unconsumed force-progress)
+ &key ignore-unconsumed force-progress action)
"This is the implementation of the `error' parser."
(multiple-value-bind (result win consumedp) (funcall parser)
(cond ((or win
;; simply to propagate the current failure back to the caller, but
;; we handled that case above.
(syntax-error scanner result)
+ (when action (funcall action))
(when (and force-progress (not consumedp)) (scanner-step scanner))
(funcall recover)))))