DMD 1.021 and 2.004 releases

Chris Nicholson-Sauls ibisbasenji at gmail.com
Mon Sep 10 23:30:35 PDT 2007


Kirk McDonald wrote:
> Walter Bright wrote:
>> Kirk McDonald wrote:
>>
>>> Walter Bright wrote:
>>>
>>>> The more unusual feature is the token delimited strings.
>>>
>>>
>>> Which, since there's no nesting going on, are actually very easy to 
>>> match. The Pygments lexer matches them with the following regex:
>>>
>>> q"([a-zA-Z_]\w*)\n.*?\n\1"
>>
>>
>> I meant the:
>>
>>     q{ these must be valid D tokens { and brackets nest } /* ignore 
>> this } */ };
>>
> 
> Those are also fairly easy. The Pygments lexer only highlights the 
> opening q{ and the closing }. The tokens inside of the string are 
> highlighted normally.
> 
> Since this lexer is the one used by Dsource, I've thrown together a wiki 
> page showing it off:
> 
> http://www.dsource.org/projects/dsource/wiki/DelimitedStringHighlighting
> 

That's pretty danged nifty.  Any chance, however, that it could apply a slight background 
color to the token string?

-- Chris Nicholson-Sauls



More information about the Digitalmars-d-announce mailing list