fix error messages

This commit is contained in:
Ryan Culpepper 2018-03-30 12:23:23 +02:00
parent 954823ec5f
commit 6f628b2531
2 changed files with 4 additions and 2 deletions

View File

@ -171,7 +171,7 @@
#rx"too many ellipses in template") #rx"too many ellipses in template")
(terx (syntax aa) (terx (syntax aa)
#rx"missing ellipses with pattern variable in template") #rx"missing ellipsis with pattern variable in template")
(terx (syntax (?@)) (terx (syntax (?@))
#rx"illegal use") #rx"illegal use")

View File

@ -361,8 +361,10 @@
(pvar var var check #f)] (pvar var var check #f)]
[(>= depth pvar-depth) [(>= depth pvar-depth)
(pvar var (gentemp) check (- depth pvar-depth))] (pvar var (gentemp) check (- depth pvar-depth))]
[(zero? depth)
(wrong-syntax id "missing ellipsis with pattern variable in template")]
[else [else
(wrong-syntax id "missing ellipses with pattern variable in template")])) (wrong-syntax id "too few ellipses for pattern variable in template")]))
(define (hash-ref! h k proc) (define (hash-ref! h k proc)
(let ([v (hash-ref h k #f)]) (if v v (let ([v* (proc)]) (hash-set! h k v*) v*)))) (let ([v (hash-ref h k #f)]) (if v v (let ([v* (proc)]) (hash-set! h k v*) v*))))
(let ([v (syntax-local-value id (lambda () #f))]) (let ([v (syntax-local-value id (lambda () #f))])