[Lazarus] IDE problems when using record helper types

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jul 1 21:11:05 CEST 2012


On Sun, 1 Jul 2012 19:54:04 +0200
Bernd <prof7bit at gmail.com> wrote:

> 2012/7/1 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> 
> > The codetools should support it. But I have other priorities.
> 
> In an earlier post you said it simply skips the helper keyword, does
> this mean they are parsed as if they were just normal records (or
> classes) or did I misunderstand this and the code tools actually do
> know these types as something special already?

They have a two special sub nodes, one for the "helper" and one for
"for identifier". Otherwise they are treated as class/object/....


> Can you tell me the relevant units where these things happen and where
> I should start looking for it if I (hypotetically) wanted to try
> implementing it?

unit components/codetools/finddeclarationtool.pas
The codetools searches backwards recursively until an identifier is
found. So normally it can skip most code and simply compare the names of
types. The result issored in a cache for later searches.
With helpers this system no longer works.

Mattias




More information about the Lazarus mailing list