[VisualD] Type highlighting.

Basile B. via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Aug 27 02:49:58 PDT 2016


On Sunday, 21 August 2016 at 07:39:10 UTC, Cauterite wrote:
> On Sunday, 21 August 2016 at 04:00:09 UTC, BearishMushroom 
> wrote:
>> 
>
> When you say 'type-highlighting', do you mean the highlighting 
> of user-defined types?
>
> It would certainly be difficult because anywhere you have
> alias foo = x;
> foo could be a type, a function, an expression, a template…
>
> But nevertheless I suspect it's not impossible to do this with 
> great accuracy.

Highlighting is often based on a simplified lexer. To highlight 
accurately a type a bit of parsing is necessary.

But this topic gives me the idea of "phobos style" type 
highlighting which could work without parsing, e.g when an 
identifier is found, it's either a keyword, if the first letter 
is upper case than it's a type otherwise a user identifier. I 
think I'm gonna try this in Coedit. It should be easy to add the 
Visual D too.


More information about the Digitalmars-d-ide mailing list