|
240 | 240 | ,(maybe-ddd (maybe-import bspec-sub imports-beta) dotdotdoting))
|
241 | 241 | #`(#,@pat #,pat-sub #,@(if dotdotdoting #`((... ...)) #`())))))
|
242 | 242 |
|
| 243 | + (define (bind-must-be-followed-by) |
| 244 | + (rse "#...bind must be followed by `(id tail-imports-beta tail-exports-beta)`")) |
243 | 245 |
|
244 | 246 | (syntax-case #'rest (...) ;; is it followed by a postfix/infix operator?
|
245 | 247 | [(#:refers-to imports-beta (... ...) . rest-of-body)
|
246 | 248 | (process-under #'rest-of-body #'imports-beta #'(nothing nothing))]
|
247 | 249 | [(#:refers-to imports-beta #:...bind (name tail-imports tail-exports) . rest-of-body)
|
248 | 250 | (process-under #'rest-of-body #'imports-beta #'(name tail-imports tail-exports))]
|
249 | 251 | [(#:refers-to imports-beta #:...bind . anything-else)
|
250 |
| - (rse "#...bind must be followed by `(name tail-imports tail-exports)`")] |
| 252 | + (bind-must-be-followed-by)] |
251 | 253 | [(#:refers-to imports-beta . rest-of-body)
|
252 | 254 | (process-under #'rest-of-body #'imports-beta #f)]
|
253 | 255 | [((... ...) . rest-of-body)
|
254 | 256 | (process-under #'rest-of-body #f #'(nothing nothing))]
|
255 | 257 | [(#:...bind (name tail-imports tail-exports) . rest-of-body)
|
256 | 258 | (process-under #'rest-of-body #f #'(name tail-imports tail-exports))]
|
257 |
| - [(#:...bind . anything-else) |
258 |
| - (rse "#...bind must be followed by `(name tail-imports tail-exports)`")] |
| 259 | + [(#:...bind . anythinge-else) |
| 260 | + (bind-must-be-followed-by)] |
259 | 261 | [rest-of-body ;; no imports or ...s
|
260 | 262 | (process-under #'rest-of-body #f #f)]))]
|
261 | 263 |
|
|
0 commit comments