> On May 10, 2020, at 1:20 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
> CleanPosToCaret is using a binary search. Compared to the other
> operations like parsing, this is is hardly measurable.
Thanks, I got it working now.
Regards,
Ryan Joseph
___
On Sat, 9 May 2020 20:55:24 +0700
Ryan Joseph via fpc-pascal wrote:
> > On May 9, 2020, at 4:36 PM, Mattias Gaertner via fpc-pascal
> > wrote:
> >
> > Use Tool.CleanPosToCaret(Node.StartPos,xyp) to get the file, line
> > and column.
>
> Thanks, I was just using the raw Node.StartPos location
> On May 9, 2020, at 4:36 PM, Mattias Gaertner via fpc-pascal
> 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 he
On Thu, 7 May 2020 20:21:35 +0700
Ryan Joseph via fpc-pascal wrote:
> > On May 7, 2020, at 5:26 PM, Mattias Gaertner via fpc-pascal
> > wrote:
> >
> > Nodes are always associated with a Tool. Tool.MainFilename gives the
> > file, where parsing started.
> >
>
> Just curious, can you explain
> On May 7, 2020, at 8:21 PM, Ryan Joseph wrote:
>
>>> 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?
>
> I start with
> On May 7, 2020, at 5:26 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Nodes are always associated with a Tool. Tool.MainFilename gives the
> file, where parsing started.
>
Just curious, can you explain the reasoning of "tools"? I haven't exactly
figured out the delegation of tasks in y
On Thu, 7 May 2020 12:26:53 +0200
Mattias Gaertner via fpc-pascal 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
On Thu, 7 May 2020 16:26:12 +0700
Ryan Joseph via fpc-pascal wrote:
> When using code tools I've found that it needs to start from a main
> unit (otherwise other relevant macros may not be set) and then insert
> includes into the source text. This is fine but when I inspect the
> node tree (TCode
When using code tools I've found that it needs to start from a main unit
(otherwise other relevant macros may not be set) and then insert includes into
the source text. This is fine but when I inspect the node tree (TCodeTreeNode)
how do I know which include a node came from?
I need this inform