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

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Oct 16 16:53:21 CEST 2022


On Sun, 16 Oct 2022 21:05:23 +0700
Hairy Pixels via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

> > On Oct 16, 2022, at 4:17 PM, Mattias Gaertner via fpc-pascal
> > <fpc-pascal at lists.freepascal.org> wrote:
> > 
> > That's correct. There are no nodes for simple statements like
> > "a:=1".  
> 
> Really? I was going to use this to find unknown identifiers (for LSP
> diagnostics) and try to implement LSP’s new inlay parameter hints
> feature. I didn’t see function calls appear as nodes either. Is there
> anything at all that’s captured in code blocks?

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.

Mattias



More information about the fpc-pascal mailing list