EC_INTERA..._CALLBACK(3)

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

✨ NAME ✨

ec_interact_get_callback β€” bestie, this is the little function that goes and gets the callback attached to a parse tree πŸ’–

It lives in the Libecoli Programmer's Manual, section 3, and its whole name is EC_INTERA..._CALLBACK(3). iykyk.


🌸 SYNOPSIS 🌸

#include <ecoli/interact.h>

ec_interact_command_cb_t ec_interact_get_callback(
    struct ec_pnode   *parse   /* The parsed tree. */
);

okay so you #include <ecoli/interact.h> first, obviously, and then you hand over one thing: a struct ec_pnode *parse, which is the parsed tree, and that's it, that's the whole vibe πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

So like, here's the tea β˜•: this function browses the parse tree and tries to find an attribute called EC_INTERACT_CB_ATTR that's attached to a grammar node referenced in the tree. That's the whole quest. It's giving treasure hunt, ngl πŸ”₯

Once it finds that attribute, it returns the value of it β€” and that value is a function pointer. Not me casually handing you a function pointer, slay πŸ’…βœ¨


πŸ‘‘ RETURN VALUE πŸ‘‘

It gives you back the function pointer that's used as the command callback. That's the main character of this whole page, fr fr πŸŽ€


🌈 SEE ALSO 🌈

The whole friend group, one big group chat of related calls πŸ’œ:


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


bestie this was libecoli, dated 2026-06-11, and the page is EC_INTERA..._CALLBACK(3) β€” obsessed with her honestly, periodt 🫢🌸
πŸ“¦ where this page comes from