[Lazarus] Syntax highlighting anomalies

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Oct 8 21:13:48 CEST 2010


On Fri, 08 Oct 2010 20:58:31 +0200
Sven Barth <pascaldragon at googlemail.com> wrote:

> On 08.10.2010 20:52, Mattias Gaertner wrote:
> > On Fri, 08 Oct 2010 20:39:27 +0200
> > Sven Barth<pascaldragon at googlemail.com>  wrote:
> >
> >> [...]
> >> The only troubles make hybrids like "index" and "message".
> >
> > Actually they are more simple than you think. They are highlighted by
> > the synedit highlighter correct.

oops. I confused that. A few cases were implemented, but not all.

> > The trouble makers are postfix modifiers like 'default' and 'cvar'.
> 
> But why do we need to highlight those two like Delphi does? Why does 
> "index" need to be bold if it's in "Foo[Index: Integer]" if I'd expect 
> it to be highlighted only in "Bar index 34"? Why does "message" need to 
> be highlighted everywhere if it is a keyword only in "procedure 
> Foo(aMsg: TMsgRec); message Bar;"?
> 
> This is what I don't understand.

Because comfort costs. This has nothing to do with Delphi
compatibility, but that the highlighter is optimized for speed not
for correctness.

You can create a bug report.

Mattias




More information about the Lazarus mailing list