[Lazarus] Syntax highlighting anomalies

Bernd Kreuss prof7bit at googlemail.com
Sat Oct 9 13:26:18 CEST 2010


On 09.10.2010 12:43, Bernd Kreuss wrote:

> The changes to the highlighter are just handful of lines, I quickly
> hacked something together yesterday evening to see how this mode would
> look like and it seems to work and I very much like how my programs
> appear in this mode.

Attached is a diff of my changes:

* do not highlight String
* do not highlight AnsiString
* do not highlight WideString
* highlight break
* highlight continue
* highlight exit
* highlight message only in a procedure defnition (partial fix to the
bug mentioned earlier, it does not eliminate all cases, judging from the
comments in the source a complete fix would need an improved parser in
the highlighter, but at least it now gets rid of highlighted "message"
anywhere *outside* the line where a procedure is defined.

the above patch is what I now use here locally and I like it much better
than the original one, but I don't think these radical changes would be
easily accepted by the core developers. It tries to highlight the ideas
and intentions in the programmer's mind and not so much the strict and
sometimes odd language definition.

Bernd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: highlighter-modification.diff
Type: text/x-diff
Size: 3181 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20101009/80e93ee9/attachment-0002.diff>


More information about the Lazarus mailing list