EC_NODE_FIND(3)

πŸ“¦
version 0.11.7 Β· 4 versions
, in fedora 44

✨ EC_NODE_FIND ✨

okay so bestie, welcome to EC_NODE_FIND(3) from the Libecoli Programmer's Manual β€” this is the lil function that goes hunting through your grammar tree for one specific node, and honestly? it's giving search-and-rescue but make it cute πŸŽ€


πŸ’– NAME πŸ’–

ec_node_find β€” Find a node from its identifier string.

like, you give it an id, it gives you the node. match made in heaven fr fr πŸ¦‹


🌸 SYNOPSIS 🌸

#include <ecoli/node.h>

struct ec_node * ec_node_find(
    struct ec_node   *node,  /* The grammar tree. */
    const char       *id     /* The identifier to match. */
);

🧚 DESCRIPTION 🧚

So here's the vibe: it browses the tree using pre-order depth traversal, and returns the first node that matches the given identifier. 🫢

Pre-order depth traversal, meaning it dives deep before it goes wide β€” first match wins, no cap. πŸ’…


πŸ‘‘ RETURN VALUE πŸ‘‘

A node matching the identifier. that's it, that's the tea ✨


🌈 SEE ALSO 🌈

the whole friend group, assembled:


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


lowkey iconic of them to write this whole thing, ngl πŸ’œ

and that's a wrap!! this page came from libecoli, dated 2026-06-11, filed under EC_NODE_FIND(3) β€” mwah, periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from