EC_PNODE_FIND(3)

πŸ’– EC_PNODE_FIND πŸ’–

okay bestie, welcome to the ec_pnode_find(3) page from the Libecoli Programmer's Manual β€” yes it's a section 3 thing, yes it's a C function, no you don't have to be scared. we're just gonna find a node. together. 🫢


✨ NAME ✨

ec_pnode_find β€” Find a node from its identifier.

like, you give it an id, it gives you the node. that's the whole plot. 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <ecoli/parse.h>

const struct ec_pnode * ec_pnode_find(
    /*
     * The node of the parsing tree where the search starts.
     */
    const struct ec_pnode   *root,
    const char              *id     /* The node identifier string to match. */
);

so there's a root β€” that's the node of the parsing tree where the search starts, no cap β€” and then id, which is the node identifier string to match. two args, zero drama. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

bestie listen. this function finds the first node in the parsing tree that has the given node identifier. that's it, that's the job.

and the way it goes looking? it does a depth-first search. so it dives all the way down one branch before it comes back up for the next one. it's giving focused. it's giving main character energy. πŸ”₯


πŸ’œ RETURN VALUE πŸ’œ

  • the first node matching the identifier ✨
  • or NULL if it's not found 😭

that's it. if you get NULL, it's not hiding from you, it's literally not there.


🌈 SEE ALSO 🌈

the whole friend group, gathered for you, in the exact order they were introduced:

ngl that's a squad. go read them. iykyk. πŸ‘‘


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


okay that's the page!! Libecoli, dated 2026-06-11, and yes it really is EC_PNODE_FIND(3) β€” go forth and find your node bestie, you're gonna slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from