[racket] Abstract datum literal out of syntax class
Is there a way to abstract datum literals out of a (splicing) syntax class?
I have a number of patterns that look something like this:
(~optional (clause-name: element ...))
and I'd like to factor that out into a common syntax class, but be able to
specialize it according to the specific clause name I'm expecting. For
example, instead of something like this:
(~optional (my-clause: element ...))
I would have a syntax class called "maybe-clause" and just write
(~var clause (maybe-clause my-clause:))
Is this possible?
P.S. I know that I should be using literals instead of datum literals, but
that's a refactoring that needs to happen to this code later on. In any
case, I assume one has the same problems with literals, too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140217/4e43070d/attachment.html>