X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/ffc2a7b8364cc459ff686cfce645079b52d11466..26c5ecfef79e0158c3ea38e9c32ad1fe3e85be3e:/src/lexer-proto.lisp diff --git a/src/lexer-proto.lisp b/src/lexer-proto.lisp index 1850326..a70addc 100644 --- a/src/lexer-proto.lisp +++ b/src/lexer-proto.lisp @@ -79,12 +79,11 @@ (defun syntax-error (scanner expected &key (continuep t)) (show-token (token-type scanner) (token-value scanner))))) (export 'lexer-error) -(defun lexer-error (char-scanner expected consumedp) +(defun lexer-error (char-scanner expected) "Signal a continuable lexical error." (cerror* "Lexical error: ~ expected ~{~#[~;~A~;~A or ~A~:;~A, ~]~} ~ - but found ~/sod::show-char/~ - ~@[ at ~A~]" + but found ~/sod::show-char/" (mapcar (lambda (exp) (typecase exp (character (format nil "~/sod::show-char/" exp)) @@ -96,8 +95,7 @@ (defun lexer-error (char-scanner expected consumedp) (t (format nil "" exp)))) expected) (and (not (scanner-at-eof-p char-scanner)) - (scanner-current-char char-scanner)) - (and consumedp (file-location char-scanner)))) + (scanner-current-char char-scanner)))) (export 'skip-until) (defparse skip-until (:context (context token-scanner-context)