From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Generic stack I can use in C core?
Date: Sat, 24 Sep 2022 09:11:24 +0300 [thread overview]
Message-ID: <83wn9tnvxv.fsf@gnu.org> (raw)
In-Reply-To: <56706B8D-170F-420D-91C8-6BF888314B21@gmail.com> (message from Yuan Fu on Fri, 23 Sep 2022 14:56:23 -0700)
> 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.
next prev parent reply other threads:[~2022-09-24 6:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 19:20 Generic stack I can use in C core? Yuan Fu
2022-09-23 19:24 ` Yuan Fu
2022-09-23 20:12 ` Eli Zaretskii
2022-09-23 21:56 ` Yuan Fu
2022-09-24 6:11 ` Eli Zaretskii [this message]
2022-09-24 6:18 ` Po Lu
2022-09-24 16:52 ` Yuan Fu
2022-09-25 0:20 ` Po Lu
2022-09-24 16:51 ` Yuan Fu
2022-09-25 2:45 ` Richard Stallman
2022-09-25 5:01 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wn9tnvxv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).