Better error message for certain bogus signatures.
This commit is contained in:
parent
7572b24870
commit
3e205b6193
|
@ -132,6 +132,10 @@
|
|||
?access
|
||||
?signature-expr
|
||||
?stx)))
|
||||
((signature ?stuff ...)
|
||||
(raise-syntax-error #f
|
||||
"`signature' als Operator ergibt keinen Sinn"
|
||||
stx))
|
||||
((?signature-abstr ?signature ...)
|
||||
(identifier? #'?signature-abstr)
|
||||
(with-syntax ((?stx (phase-lift stx))
|
||||
|
@ -139,6 +143,7 @@
|
|||
((?signature-expr ...) (map (lambda (sig)
|
||||
(parse-signature #f sig))
|
||||
(syntax->list #'(?signature ...)))))
|
||||
|
||||
(with-syntax
|
||||
((?call (syntax/loc stx (?signature-abstr ?signature-expr ...))))
|
||||
#'(make-call-signature '?name
|
||||
|
@ -146,7 +151,7 @@
|
|||
(delay ?signature-abstr) (delay (list ?signature-expr ...))
|
||||
?stx))))
|
||||
(else
|
||||
(raise-syntax-error 'signature
|
||||
(raise-syntax-error #f
|
||||
"ungültige Signatur" stx))))
|
||||
|
||||
; regrettable
|
||||
|
|
|
@ -122,6 +122,10 @@
|
|||
?access
|
||||
?signature-expr
|
||||
?stx)))
|
||||
((signature ?stuff ...)
|
||||
(raise-syntax-error #f
|
||||
"`signature' makes no sense as an operator"
|
||||
stx))
|
||||
((?signature-abstr ?signature ...)
|
||||
(identifier? #'?signature-abstr)
|
||||
(with-syntax ((?stx (phase-lift stx))
|
||||
|
@ -138,7 +142,7 @@
|
|||
(delay (list ?signature-expr ...))
|
||||
?stx))))
|
||||
(else
|
||||
(raise-syntax-error 'signature
|
||||
(raise-syntax-error #f
|
||||
"invalid signature" stx))))
|
||||
|
||||
; regrettable
|
||||
|
|
Loading…
Reference in New Issue
Block a user