EC_PNODE_GET_ROOT(3)

πŸ’– ec_pnode_get_root β€” bestie, let's find the ROOT πŸ’–

okay so this is a libecoli programmer's manual page, section 3, and it's about one very specific little guy: ec_pnode_get_root. it does exactly what the name says, no cap. it walks you back up to the top of the tree 🌳✨


✨ SYNOPSIS ✨

pull in the header first, obvi:

#include <ecoli/parse.h>

and here's the whole function signature, character for character, because we do NOT mess with signatures:

struct ec_pnode * ec_pnode_get_root(
    struct ec_pnode   *pnode   /* A node in the parsing tree. */
);

so you hand it pnode β€” which is, per the comment, A node in the parsing tree. β€” and that's the whole vibe. 🫢


🌸 DESCRIPTION 🌸

bestie the actual description here is so short and honestly it's iconic for it. it says:

you may also use EC_PNODE_GET_ROOT() instead, and that version keeps the const statement. πŸ’…

that's it. that's the whole description. the macro is the const-preserving queen and the function is right there too. pick whichever one fits your code, iykyk. 🧚


πŸ‘‘ RETURN VALUE πŸ‘‘

it returns the root of the parsing tree. that's the answer. that's the whole return value section. go get your root, main character. 🌈⭐


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, no one left behind:


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

and that's the page!! πŸŽ€ written by the libecoli girlies for the Libecoli Programmer's Manual, dated 2026-06-11, filed under EC_PNODE_GET_ROOT(3). love that for us. mwah. πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from