EC_PNODE_...RST_CHILD(3)
π EC_PNODE_...RST_CHILD π
okay bestie, welcome to the Libecoli Programmer's Manual β yes, that's the manual name, no I will not stop saying it. this one's short and sweet and honestly kinda iconic for it. it's all about grabbing the first child of a node in the parsing tree. that's the whole vibe. let's go π¦
β¨ NAME β¨
ec_pnode_get_first_child β Get the first child of a node in the parsing tree.
like. it gets the first child. of a node. in the parsing tree. no cap, that's the job π
πΈ SYNOPSIS πΈ
#include <ecoli/parse.h>
struct ec_pnode * ec_pnode_get_first_child(
const struct ec_pnode *pnode /* A node in the parsing tree. */
);
so you pull in <ecoli/parse.h> and then you hand it a pnode β which is, and I quote the comment exactly, A node in the parsing tree. β and it gives you back a pointer to a struct ec_pnode. that's it. that's the whole function signature. so clean, so minimal, we love a low-maintenance queen π
π RETURN VALUE π
The first child node, or NULL if it has no child.
that's the tea β β you get the first child back, and if this node is giving only-child-with-no-children energy (aka it literally has no child), you get NULL. always check for that NULL bestie, it WILL humble you π
π SEE ALSO π
the whole friend group fr fr, all the siblings and cousins of this function:
ec_pnode_len(3)ec_pnode_get_strvec(3)ec_parse(3)ec_parse_strvec(3)ec_pnode(3)ec_pnode_free_children(3)ec_pnode_get_root(3)ec_pnode_get_parent(3)ec_pnode_find_next(3)ec_pnode_free(3)ec_pnode_dup(3)ec_pnode_matches(3)ec_pnode_dump(3)ec_pnode_unlink_child(3)ec_pnode_next(3)ec_pnode_del_last_child(3)ec_pnode_link_child(3)ec_pnode_count(3)ec_pnode_get_attrs(3)ec_pnode_get_last_child(3)ec_pnode_get_node(3)ec_pnode_find(3)ec_parse_child(3)
go read them all, they ate π₯
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the whole page, bestie, you're officially caught up π«Ά stay hydrated, check your NULLs, and remember: every parsing tree has a first child, and now you know how to find it. periodt π
libecoli Β· 2026-06-11 Β· EC_PNODE_...RST_CHILD(3) β mwah, signing off, ily, go write some C π β¨
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms