chiark / gitweb /
src/lexer-impl.lisp: Set default `:keep-end' in `%skip-until' function.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 26 Mar 2017 14:16:18 +0000 (15:16 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 Jun 2018 18:58:28 +0000 (19:58 +0100)
The parser-macro set this correctly, but the function didn't.

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)