[fpc-pascal] Using include files in code tools

Mattias Gaertner nc-gaertnma at netcologne.de
Sat May 9 20:20:06 CEST 2020

On Sat, 9 May 2020 20:55:24 +0700
Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

> > On May 9, 2020, at 4:36 PM, Mattias Gaertner via fpc-pascal
> > <fpc-pascal at lists.freepascal.org> wrote:
> > 
> > Use Tool.CleanPosToCaret(Node.StartPos,xyp) to get the file, line
> > and column.  
> Thanks, I was just using the raw Node.StartPos location. Is there any
> flag in a node to know if it came from an include? That would be
> helpful because otherwise I need to call CleanPosToCaret on every
> symbol regardless of where it came from. 

CleanPosToCaret is using a binary search. Compared to the other
operations like parsing, this is is hardly measurable.


More information about the fpc-pascal mailing list