&key (keep-end (not (null (cdr token-types)))))
"This is the implementation of the `skip-until' parser."
(do ((consumedp nil t))
- ((member (token-type scanner) token-types)
+ ((let ((type (token-type scanner))
+ (value (token-value scanner)))
+ (some (lambda (spec)
+ (multiple-value-bind (want-type want-value)
+ (cond ((listp spec) (values (car spec) (cadr spec)))
+ (t (values spec t)))
+ (and (eq want-type type)
+ (or (eq want-value t)
+ (equal want-value value)))))
+ token-types))
(unless keep-end (scanner-step scanner))
(values nil t (or keep-end consumedp)))
(when (scanner-at-eof-p scanner)