Thread overview
Visual D: is it possible to highlight function name and function call?
Jul 24, 2015
timepp
Jul 25, 2015
Rainer Schuetze
Jul 26, 2015
timepp
July 24, 2015
I have checked the visual D code, seems the highlighter only do a very simple lexer parse. is it possible to do the semantic check for highlighter (as the tooltip did)?
July 25, 2015

On 24.07.2015 08:55, timepp wrote:
> I have checked the visual D code, seems the highlighter only do a very
> simple lexer parse. is it possible to do the semantic check for
> highlighter (as the tooltip did)?

You're right, the highlighting just uses lexer information. That's why identifiers all have the same color (except when explicitely changed, see http://rainers.github.io/visuald/visuald/Editor.html).

Visual D uses Alex Bothes semantic engine which is pretty good, but I suspect it still produces too many false errors when actually using it to show semantic errors (just because D code can be pretty complex to analyze).

Just applying it to highlighting might be an intermediate step, as false categorization might not be too annoying.

What kind of identifiers are you thinking of highlighting differently?

- types
- templates
- global/tls/local variables
- class/struct/union members
- free functions/member functions/properties

There are so many possible different kinds plus combinations of these...
July 26, 2015
On Saturday, 25 July 2015 at 07:21:16 UTC, Rainer Schuetze wrote:
>
>
> On 24.07.2015 08:55, timepp wrote:
>> I have checked the visual D code, seems the highlighter only do a very
>> simple lexer parse. is it possible to do the semantic check for
>> highlighter (as the tooltip did)?
>
> You're right, the highlighting just uses lexer information. That's why identifiers all have the same color (except when explicitely changed, see http://rainers.github.io/visuald/visuald/Editor.html).
>
> Visual D uses Alex Bothes semantic engine which is pretty good, but I suspect it still produces too many false errors when actually using it to show semantic errors (just because D code can be pretty complex to analyze).
>
> Just applying it to highlighting might be an intermediate step, as false categorization might not be too annoying.
>
> What kind of identifiers are you thinking of highlighting differently?
I think the following two features would be enough to me:
1. highlight function call/function decl
2. when insertion point inside a variable, highlight all occurrences of the same var (like Visual C++)
>
> - types
> - templates
> - global/tls/local variables
> - class/struct/union members
> - free functions/member functions/properties
>
> There are so many possible different kinds plus combinations of these...