[Lazarus] [fpc-pascal] character escaping with ^LETTER

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jan 25 14:23:39 CET 2015


On Sun, 25 Jan 2015 13:00:17 +0000
C Western <l at c-m-w.me.uk> wrote:

> On 24/01/15 20:33, Martin Frb wrote:
> > On 19/01/2015 17:09, Martin Frb wrote:
> >> On 19/01/2015 13:17, Dmitry Boyarintsev wrote:
> >>>
> >>> CodeTools syntax highlighter won't recognize the syntax as characters
> >>> either (delphi 7 highlighter doesn't recognize it as a character
> >>> escaping as well)
> >>>
> >>
> >> Add  that to the bugtracker please (as synedit HL issue).
> >>
> >> It is probably easy to fix, simple a question of not forgetting it
> >
> > Implemented in Lazarus trunk
> > ^C now highlights as char, except, for things like "type x = ^C;"
> >
> > Note there are places where neither are char, nor a ^SomeType are legal,
> > in those cases there is no rule as what it will be highlighted.
> 
> There seems to be a corner case that needs a little work:
> 
> TypeData :=
> GetTypeData(PropInfo^.PropType{$IFNDEF FPC}^{$ENDIF});
> 
> causes all the rest of the file after "FPC" to show as grayed out, i.e. 
> as if it was one big conditional.

That is because the highlighter now treats ^{ as constant and so the
{$endif} is not seen by the highlighter code.

AFAIK only ^A..^Z are constants.

Mattias




More information about the Lazarus mailing list