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

Hairy Pixels genericptr at gmail.com
Mon Oct 17 03:41:23 CEST 2022



> On Oct 16, 2022, at 9:53 PM, Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> Blocks like WHILE and TRY.
> 
> Codetools are optimized for finding declarations of a few expressions
> between edits. To find the parameters, call for each identifier
> followed by ( the FindCodeContext function.

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?

If not maybe I could make a Tool subclass? I tried this once but I couldn’t figure out how that may work and I was confused about all the different types of tools and how they fit together.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list