[Lazarus] Syntax highlighting anomalies
Bernd Kreuss
prof7bit at googlemail.com
Sat Oct 9 12:43:04 CEST 2010
On 09.10.2010 05:24, Hans-Peter Diettrich wrote:
> Question is, what the users expect from a "syntax" highlighter. IMO a
> user doesn't expect it to really follow the (currently multiple
> different) syntax variations.
Yes, this is the real underlying question here: Should the highlighter
highlight every minor oddity in the language definition in the boldest
colors or should it rather highlight the structure of the program as it
is seen from the programmer's perspective?
Maybe an additional mode for the highlighter could be introduced (a
simple flag that can be set to put it into the new mode), by default it
would behave as always and highlight the keywords exactly as they are
defined in the language definition (call this the "strict mode") and
another mode that tries to highlight an "ideal" Pascal language in which
these oddities do not exist and it would highlight the program structure
like it is intended and seen by the programmer (call it "relaxed mode"
or maybe somebody can find a more intuitive name for these highlighter
modes).
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.
Bernd
More information about the Lazarus
mailing list