I want to do something like this:

#lang racket
(require syntax/parse)

(define-syntax-class (myclass . args)
  (pattern x:id))

(syntax-parse #'(a (b c))
  [((~var x (myclass #'(y ...))) ...
    (y z) ...)
   #'(x ...)])

But this doesnt work because I'm trying to pass y before it is bound.
Is there an elegant way to do this, while still preserving my
syntax-class abstraction? If I leave x undeclared initially and then
use #:declare, then x ... will match everything, which I dont want.

I'm almost certainly missing something obvious but I can't figure it out.
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to