EC_NODE_TYPE_REGISTER(3)

✨ EC_NODE_TYPE_REGISTER ✨

okay bestie, so this is from the Libecoli Programmer's Manual β€” section 3, the library functions zone πŸ’…


🌸 NAME 🌸

ec_node_type_register β€” literally just: register a node type. that's the whole gig. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

#include <ecoli/node.h>

int ec_node_type_register(
    struct ec_node_type   *type,      /* The node type to be registered. */
    bool                   override   /* Allow the registration of an existing type. */
);

πŸ’– DESCRIPTION πŸ’–

so. the name of the type you're registering is a unique identifier β€” like, it's the name, one of one, no duplicates allowed in the group chat. ✨

but β€” and this is the plot twist β€” you can force a registration of a type that has a name that already exists. how? set override to true. πŸ’…

careful though!! the initial type is not removed from the list. nope. instead, the new one gets added before it in the list. so the og is still there, just… behind. it's giving "new girl walked in and stood in front of you" energy. 😭

πŸ¦‹ STRUCTURES πŸ¦‹

a structure that describes a grammar node type. 🌈

it's usually defined as a static const structure, inside the code that's defining a new grammar node type. wanna see examples? go peek at the ecoli_node_<type>.c files, they got the receipts. πŸ“‚

struct ec_node_type {
};

⭐ RETURN VALUE ⭐

  • 0 β€” on success 🫢
  • negative value β€” on error πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, in order, periodt:


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


okay that's the whole page bestie, you ate πŸ’…βœ¨

libecoli Β· 2026-06-11 Β· that's the version and the date, mwah, no notes, bye πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from