chiark / gitweb /
src/lexer-impl.lisp: Set default `:keep-end' in `%skip-until' function.
[sod] / src / lexer-impl.lisp
index ffd522feb7c5b1e749c2a4350727000fcbe6fe46..6a9b2cec0d590f7ccbc631043afc2b07b189d509 100644 (file)
@@ -46,7 +46,8 @@ (defun show-char (char)
         (format nil "`~C'" char))
        (t (format nil "<~(~:C~)>" char))))
 
-(defun %skip-until (scanner token-types &key keep-end)
+(defun %skip-until (scanner token-types
+                   &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)