[fpc-pascal] Using include files in code tools
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu May 7 12:33:15 CEST 2020
On Thu, 7 May 2020 12:26:53 +0200
Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>[...]how do I know which include a
> > node came from?
>
> Nodes are always associated with a Tool. Tool.MainFilename gives the
> file, where parsing started.
>
> > I need this information so I can get navigate to the include file
> > AND relative text offset into the include file text.
>
> There are plenty of functions for include files. Can you give an
> example what you need?
Tool.CleanPosToCaret(Node.StartPos,CXY)
Tool.CleanPosToCodePos(Node.StartPos,CP)
Mattias
More information about the fpc-pascal
mailing list