Porting VisualD to Windows 8 and Visual Studio 11

Rainer Schuetze r.sagitario at gmx.de
Tue Jun 12 00:31:48 PDT 2012



On 6/11/2012 7:57 PM, Roman D. Boiko wrote:
> On Monday, 11 June 2012 at 17:41:12 UTC, Rainer Schuetze wrote:
>> No. Syntax highlighting is done by the lexer, no (complex) parsing
>> involved. The only case where the parser is consulted (but not waiting
>> for an answer, just using cached information) is to figure out whether
>> "in"/"is" are used as operators or as parameter modifier/IsExpression,
>> respectively.
>>
>> Syntax highlighting needs to be rather fast, as it is done during
>> drawing, so switching context is out of the question. Instead, Visual
>> D keeps a lexer-state (an int) per line and continues scanning from
>> the start of the line when color information is requested by the IDE.
> I couldn't find respective code so far

It's mostly in class Colorizer, with the IDE paint callback being 
ColorizeLine.


More information about the Digitalmars-d mailing list