[racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

From: Alexander D. Knauth (alexander at knauth.org)
Date: Sat Dec 27 12:45:42 EST 2014

But that produces '("A " ("string") " escape”) when I would want it to produce '("A " "string" " escape”).

On Dec 27, 2014, at 11:42 AM, Matthew Butterick <mb at mbtype.com> wrote:

> @list{A @'{string} escape}
> 
> ?
> 
> 
> On Sat, Dec 27, 2014 at 8:21 AM, Alexander D. Knauth <alexander at knauth.org> wrote:
> Is there any way to make the at-exp reader turn @list{A @"string" escape} into (list "A " "string" " escape”),
> instead of into (list “A string escape”) ?
> 
> The reason is that I wanted to make my own versions of format, printf, fprintf, error, etc. that would work with the at-exp reader and
> convert something like this:
> @my-error['f]{message
>                 given: ~v@"something"
>                 other-arguments: ~v@"something-else" ~v@"another-something-else"}
> into something like this:
> (error 'f "message\n  given: ~v\n  other-arguments: ~v ~v"
>        "something" "something-else" "another-something-else")
> 
> It works the way I want it to if the “something”s etc. are anything other than a string literal, but is there any way to make it work for string literals?
> 
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
> 
> 
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141227/5cb551ef/attachment.html>

Posted on the users mailing list.