emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generic stack I can use in C core?


From: Yuan Fu
Subject: Re: Generic stack I can use in C core?
Date: Sat, 24 Sep 2022 09:51:06 -0700


> On Sep 23, 2022, at 11:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 23 Sep 2022 14:56:23 -0700
>> Cc: emacs-devel@gnu.org
>> 
>>>> *Something that allocates a chunk of memory to store the nodes and 
>>>> automatically grows and shrinks and copies stuff over.
>>> 
>>> What kind of stuff do you want to store there?
>> 
>> I want to traverse a tree depth-first using stacks. If there is a generic 
>> stack I’ll use that, if not I’ll just use
>> 
>> struct stack_node {
>>  TSNode node;
>>  TSNode *next;
>> };
> 
> Then I don't think we have anything ready for that, no.  In the couple
> of places where we traverse a tree in depth-first order, we just
> recurse.

Cool, thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]