[racket] paren-shape

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun May 13 21:23:22 EDT 2012

I think you probably have to recur when it is a pair, as the
properties can get cons'd together multiple times.

On Sun, May 13, 2012 at 2:57 PM, Jens Axel Søgaard
<jensaxel at soegaard.net> wrote:
> 2012/5/13 Danny Yoo <dyoo at hashcollision.org>:
>> Does this apply?
>>  http://lists.racket-lang.org/dev/archive/2012-March/009205.html
>
> Yes!
>
> The test for curliness must take the (cons orig new)
> new possibility into account, and then it just works.
>
> Thanks.
>
> /Jens Axel
>
> (define-for-syntax (curly? stx)
>    (let ([p (syntax-property stx 'paren-shape)])
>      (and p (or (eqv? p #\{)
>                 (and (pair? p)
>                      (or (eqv? (car p) #\{)
>                          (eqv? (cdr p) #\{)))))))
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users


Posted on the users mailing list.