[racket] matching optional keyword + value

From: Laurent (laurent.orseau at gmail.com)
Date: Fri Apr 27 08:47:08 EDT 2012

> > Actually, the defforms are read directly from a scribble file, so it's
> not a
> > call.
> > Is it possible to have syntax-parse deal directly with values instead of
> > syntax objects?
> > (I suppose I could turn the read list into a syntax object, but that's
> > probably not the best way to do it, is it?)
>
> If you're processing user input, it might have errors, in which case
> you'll probably want source locations.  So I would just use
> `read-syntax' instead of `read', and process with `syntax-parse'.
>

Well, I'm processing Racket's scribblings, so hopefully the docs won't have
errors ;)
But that's quite an interesting possibility, my problem here is that I
already have a number of cases that use read and match, and using
read-syntax instead would force me to change it all...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120427/cf8371fa/attachment-0001.html>

Posted on the users mailing list.