[fpc-pascal] Code tools unrelated completions

Mattias Gaertner nc-gaertnma at netcologne.de
Tue May 5 11:35:55 CEST 2020


On Tue, 5 May 2020 11:19:34 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

> On Tue, 5 May 2020, Ryan Joseph via fpc-pascal wrote:
> 
> >
> >  
> >> On May 5, 2020, at 3:56 PM, Michael Van Canneyt
> >> <michael at freepascal.org> wrote:
> >> 
> >> They are in the system unit, so they're always related to any unit.
> >> 
> >> They have a compilerproc modifier set, so I suppose there is some
> >> property/attribute of the identifier that indicates this modifier.
> >> You should check for that and filter out these results.  
> >
> > AFAIK they are not meant to be called by users so I'd like to
> > filter them out.
> >
> > how do we get function modifiers for TIdentifierListItem then?  
> 
> I have no idea. This is a question for Mattias.
> 
> But looking at PascalParserTool.pas, line 1988 I think I may have
> been too optimistic;
> 
>     end else if UpAtomIs('COMPILERPROC') then begin
>        ReadNextAtom;
>        if CurPos.Flag=cafColon then begin
>          // e.g. compilerproc:fpc_in_delete_x_y_z;
>          ReadNextAtom;
>          AtomIsIdentifierSaveE(20180411194104);
>          ReadNextAtom;
>        end;
> 
> it's handled but not recorded.

Yes, recording is a todo.
If you want to check this you have to use the parsing functions like
ProcNodeHasSpecifier or MoveCursorToProcSpecifier.

Mattias



Mattias


More information about the fpc-pascal mailing list