[fpc-pascal] Codetools, identity nodes from includes
Ryan Joseph
genericptr at gmail.com
Tue Jul 7 09:09:09 CEST 2020
> 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;
> 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
works well, thanks.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list