EC_PNODE_DEL_LAST_CHILD(3)
π EC_PNODE_DEL_LAST_CHILD π
okay bestie, welcome to the Libecoli Programmer's Manual β¨ you're literally about to learn how to yeet the last child of a parse node and I'm so excited for you π«Ά
β¨ NAME β¨
ec_pnode_del_last_child β unlink and free the last child. that's it. that's the whole job. π
πΈ SYNOPSIS πΈ
#include <ecoli/parse.h>
void ec_pnode_del_last_child(
/*
* A node in the parsing tree which has at least one child.
*/
struct ec_pnode *pnode
);
so you're passing in one thing, <lavender>pnode</lavender>, and it's a node in the parsing tree which has at least one child β read that comment again bestie, it's important, the node needs at least one child or this whole situation is giving π«. and the return type is void β nothing comes back, no cap, she just does the thing and dips π
π DESCRIPTION π
okay so picture this: it's a shortcut. a little one-liner moment. it unlinks and frees the last child of a node. done. iconic. π
and why would you even want that? because it is a quite common operation in intermediate nodes β think ec_node_seq(), ec_node_many(), and friends β where the vibe is: you temporarily added a subtree during the completion process, and now the moment has passed and you need to remove that subtree π§Ήβ¨ it's the cleanup era. it's giving spring cleaning. it's giving "not me leaving a dangling subtree in the tree π".
so yeah: temporary subtree goes in, temporary subtree comes out, everyone moves on π
π₯ SEE ALSO π₯
the whole friend group, fr fr β go read these too:
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_get_first_child(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_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)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry. π«Ά
and that's the whole page bestie, you ate that π
the manual name is EC_PNODE_...LAST_CHILD(3) (it's a long one, she's mysterious), it shipped from libecoli dated 2026-06-11, and it's been serving parse-tree realness since 2010 π k bye, go free some children (the pointer kind, obviously) πβπ¦
π¦ 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