[racket] color partial lexemes

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Tue Aug 2 17:18:30 EDT 2011

On 08/02/2011 12:57 PM, Jon Rafkind wrote:
> Oh sorry, I realize I was talking about two different things. I set up
> a test case that creates a color:text% and explicitly calls
> `start-colorer' with the pairs, style, and get-token things I defined,
> but for implementing a language I only have access to #:info.
> I think some new keys can be passed to the #:info function that can
> get a new pair list and style function. I'll work on a patch for that.

After searching a handful of paths it seems the only way to make this
work is to hook into the 'run' button. I imagine that start-colorer can
be called each time 'run' is invoked and at which time the #:info
function can be probed for the `pairs', `token-sym->symbol' and possibly
the lexer as well.

A cursory glance at module-lexer looks like its going through the whole
process of getting the lexer by 1. calling `read-language' and 2.
calling (get-info 'color-lexer). This seems like redundant work if the
#lang hasn't changed. Hooking into the run button could do most of this
work once.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110802/a15d225e/attachment.html>

Posted on the users mailing list.