more error-message conversions and repairs

original commit: a137459b65b54d65595e854101aae7440d9e65f6
tokens
Matthew Flatt 13 years ago
parent c24fe38d91
commit 3a4a952b98

@ -294,9 +294,9 @@
longest-match-length))))))))))))) longest-match-length)))))))))))))
(lambda (ip) (lambda (ip)
(unless (input-port? ip) (unless (input-port? ip)
(raise-type-error (raise-argument-error
'lexer 'lexer
"input-port" "input-port?"
0 0
ip)) ip))
(lexer ip)))) (lexer ip))))

@ -224,10 +224,10 @@
(values tok #f v1 v2)) (values tok #f v1 v2))
((token? tok) ((token? tok)
(values (real-token-name tok) (real-token-value tok) v1 v2)) (values (real-token-name tok) (real-token-value tok) v1 v2))
(else (raise-type-error 'parser (else (raise-argument-error 'parser
"symbol or struct:token" "(or/c symbol? token?)"
0 0
tok)))) tok))))
;; extract-src-pos : position-token -> symbol any any any ;; extract-src-pos : position-token -> symbol any any any
(define (extract-src-pos ip) (define (extract-src-pos ip)
@ -237,10 +237,10 @@
(position-token-start-pos ip) (position-token-start-pos ip)
(position-token-end-pos ip))) (position-token-end-pos ip)))
(else (else
(raise-type-error 'parser (raise-argument-error 'parser
"struct:position-token" "position-token?"
0 0
ip)))) ip))))
;; extract-no-src-pos : (symbol or make-token) -> symbol any any any ;; extract-no-src-pos : (symbol or make-token) -> symbol any any any
(define (extract-no-src-pos ip) (define (extract-no-src-pos ip)

Loading…
Cancel
Save