I would also like to know about this.  For what it's worth, I also have
an extension for literal strings (the udelim package, and I've been
behind using «guillemets» as nestable literal string quotes), and I
haven't figured out how to extensibly change the coloring either.  One
of my more adventurous reader extensions treats | as a normal character,
and in the interactions pane it additionally doesn't accept a line
unless it has an even number of | characters.  Is the interaction lexing
connected to the color lexing, or is that somewhere else?

Thanks,

William


On Mon, May 01, 2017 at 03:48:06PM -0700, Andrew Gwozdziewycz wrote:
Hi Brendan,

I'm wondering if you tried the here string syntax for your use case,
which other than the fact that it requires a couple of newlines seems
similar in vein to what you were going for (e.g. it doesn't escape
anything)?

```racket
#<<HI
 Any text here, and nothing gets escaped, This is somewhat surprising.
 HI
"Any text here, and nothing gets escaped. This is somewhat surprising."
```

Cheers,

Andrew

On Mon, May 1, 2017 at 2:37 PM, brendan <bren...@cannells.com> wrote:
I wrote a little Racket meta-language that adds a dispatch macro to the 
readtable for typing string literals without escape characters. You start with 
two or more #'s followed by any non-# character, then the actual string 
content, then end with the same non-# character and the same number of #'s. So

##|"foo\bar"|##

evaluates the same as

"\"foo\\bar\""

Works great, but it does wreak quite some havoc on DrRacket's syntax coloring. 
Unfortunately as far as I can tell the only way to fix that is to replace the 
color lexer entirely; there's no compositon like there is with readtables. Is 
that correct, or is there a trick that I'm missing?

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
http://www.apgwoz.com

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to