[Lazarus] Syntax highlighting anomalies
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sat Oct 9 05:24:55 CEST 2010
Mattias Gaertner schrieb:
>> * some types (String and AnsiString) are highlighted, all other types
>> (built in or not) are not highlighted. IMHO no type names should be
>> highlighted.
>
> String is a keyword. You can not redefine it.
> Ansistring is for historical reasons highlighted as keyword too.
Right.
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.
Removing these few special types would both simplify the highlighter and
look more consistent.
> break, continue and exit are not keywords. They could be
> redefined.
I'd appreciate when, at least in mode FPC, these words would become
keywords. As already mentioned, a redefinition of these procedures can
only cause trouble. When they occur in legacy code, it would do no harm
when such modules had to be compiled in an different (Delphi) mode.
> I'm sure Martin is already thinking about making this optional. ;)
I'm just about implementing more languages (front-ends) for FPC, like
Modula. These will require their own syntax highlighters, and then I'll
think about providing alternative highlighters even for Pascal. But
don't hold your breath, this project requires an restructured compiler
and will take some more months.
DoDi
More information about the Lazarus
mailing list