EC_PNODE_COUNT(3)

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

πŸ‘‘ NAME πŸ‘‘

ec_pnode_count β€” bestie, this one literally counts how many times a node shows up in a parse subtree πŸ’…

so real quick, we're in the Libecoli Programmer's Manual and this page is the one and only EC_PNODE_COUNT(3) ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/parse.h>

unsigned int ec_pnode_count(
    /*
     * The node of the parsing tree where the search starts.
     */
    const struct ec_pnode   *root,
    const char              *id     /* The node identifier string to match. */
);

okay so here's the tea β˜• you hand it two things:

  • root β€” a const struct ec_pnode *, and it's literally the node of the parsing tree where the search starts 🫢
  • id β€” a const char *, the node identifier string to match πŸ”

and it gives you back an unsigned int β€” no cap ✨


🌸 RETURN VALUE 🌸

the number of nodes matching the identifier. that's it, that's the whole vibe πŸ’– (it's unsigned int, so no negatives, no drama, just counting πŸŽ€)


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, go say hi πŸ‘―β€β™€οΈ


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


lowkey iconic behavior from the Libecoli Programmer's Manual, dated 2026-06-11, serving EC_PNODE_COUNT(3) realness πŸŒˆπŸ’…βœ¨ mwah, periodt 🫢
πŸ“¦ where this page comes from