[Lazarus] SynEdit: TSynPasSyn and keywords

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Oct 10 20:30:33 CEST 2008


On Fri, 10 Oct 2008 20:59:19 +1100
"Alexander Klenin" <klenin at gmail.com> wrote:

> On Fri, Oct 10, 2008 at 20:00, Mattias Gärtner
> <nc-gaertnma at netcologne.de> wrote:
> 
> > Ah, then I understood correct in the first place.
> > Keywords are context sensitive and so are the highlighters.
> > A link does not work on keywords, symbols, ..., but only on
> > identifiers. You can get this with
> > Synedit1.GetHighlighterAttriAtRowCol.
> >
> > And in Lazarus it is currently only implemented for filenames and
> > identifiers in pascal.
> 
> Ok, so my second patch could be improved and the first one
> disregearded ;-). The only question is how to extract the right token
> kind from value returned by GetHighlighterAttriAtRowCol without
> breaking encapsulation? It is returned as a simple integer, and I see
> no correct way to compare it to tkIdentifier from Pascal highlighter.

I'm not yet sure, what you want to achieve. Do you need a general
solution for your application, which uses synedit, or a special
solution for the IDE?

Mattias




More information about the Lazarus mailing list