Re: [racket] Macros with Flexible Sub-Forms like (class...)

2013-02-23 Thread Asumu Takikawa
On 2013-02-23 12:34:58 -0800, Scott Klarenbach wrote: >Thanks Danny. There's also something I recall for validation, as in the >docs for (define/override...) where usage outside of a (class...) form is >a syntax error. I'll hunt...:) You can just bind the sub-forms to syntax transforme

Re: [racket] Macros with Flexible Sub-Forms like (class...)

2013-02-23 Thread Scott Klarenbach
Thanks Danny. There's also something I recall for validation, as in the docs for (define/override...) where usage outside of a (class...) form is a syntax error. I'll hunt...:) On Sat, Feb 23, 2013 at 12:19 PM, Danny Yoo wrote: > On Sat, Feb 23, 2013 at 12:22 PM, Scott Klarenbach > wrote: > >

Re: [racket] Macros with Flexible Sub-Forms like (class...)

2013-02-23 Thread Danny Yoo
On Sat, Feb 23, 2013 at 12:22 PM, Scott Klarenbach wrote: > What is the best approach for creating a macro that parses sub-forms in any > order, similar to the way (class ...) works in Racket? I believe that there's support in the syntax-parse library to parse these sub-forms in any order. Let

[racket] Macros with Flexible Sub-Forms like (class...)

2013-02-23 Thread Scott Klarenbach
What is the best approach for creating a macro that parses sub-forms in any order, similar to the way (class ...) works in Racket? I'm writing a simple sql-like dsl, and originally I had syntax that used keyword-params, as in: (query client-table #:select "first-name" #:where "type = 3") but I'm