Adjust some parser errors

This commit is contained in:
John Lorentzson 2025-07-14 17:26:06 +02:00
parent 3a5a16cc06
commit f9665ee853

View file

@ -52,7 +52,7 @@ parser's debug output.")
token (type-of (peek-token))) token (type-of (peek-token)))
(error-parser (source (previous-token)) (error-parser (source (previous-token))
"~A~%Got token ~A instead." "~A~%Got token ~A instead."
error-message (previous-token) error-message (peek-token)
(source (previous-token)))))) (source (previous-token))))))
(defun make-token-stream (tokens) (defun make-token-stream (tokens)
@ -221,8 +221,7 @@ comma ',' is required to separate arguments.")))
(t (t
(let ((expr (match-syntax assignment))) (let ((expr (match-syntax assignment)))
(consume-token 'token-end-of-statement (consume-token 'token-end-of-statement
(format nil "Couldn't find end of expression. ~A found instead." "Couldn't find end of expression.")
(peek-token)))
expr)))) expr))))
(defun wire-up-statements (statements) (defun wire-up-statements (statements)