[fpc-pascal] Exploring block statements with CodeTools not working

Hairy Pixels genericptr at gmail.com
Mon Oct 17 15:48:26 CEST 2022



> On Oct 17, 2022, at 3:31 PM, Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
>> So inlay hints need to be computed with a document range so we don’t
>> know a single X,Y position we could use to call FindCodeContext. If I
>> had a list of identifiers which were function calls in begin blocks I
>> could call FindCodeContext based on those. Is that possible?
> 
> Yes

Not following. :) If it possible to get a list of identifiers in a begin block how would you do that?

Lets say we have this program. Does CodeTools have any way to know there is a DoThis(1) call inside that begin end block without giving it an explicit position? Ideally I could give it the position of the begin block since we do get that node and it would give me back a list of identifiers which have their document position so I could perform operations on that later.

===========================

program test;

procedure DoThis(param: integer); 
begin
end;

begin
  DoThis(1);
end.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list