EC_PNODE_DEL_LAST_CHILD(3)

NAME
ec_pnode_del_last_child - Unlink and free the last child.

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
);

DESCRIPTION

Shortcut to unlink and free the last child of a node. It is a quite common operation in intermediate nodes (like ec_node_seq(), ec_node_many(), ...) to remove a subtree that was temporarily added during the completion process.

SEE ALSO

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.