[fpc-pascal] Codetools, identity nodes from includes
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Jul 7 10:00:06 CEST 2020
On Tue, 7 Jul 2020 14:09:09 +0700
Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> > On Jul 7, 2020, at 4:57 AM, Mattias Gaertner via fpc-pascal
> > <fpc-pascal at lists.freepascal.org> wrote:
> >
> > Something like this:
> >
> > Node:=AItem.Node;
> > if Node<>nil then
> > begin
> > Scanner:=Tool.Scanner;
Scanner:=AItem.Tool.Scanner;
> > LinkIndex:=Scanner.LinkIndexAtCleanPos(Node.StartPos);
> > if LinkIndex<0 then
> > // dangling node, e.g. syntax error
> > else
> > InIncludeFile:=Scanner.LinkP[LinkIndex]^.Code<>Scanner.MainCode;
> > end else
> > ; // artificial node, e.g. intrinsic
Mattias
More information about the fpc-pascal
mailing list