MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / is_callable_reference_value

Function is_callable_reference_value

internal/cbm/extract_calls.c:3910–3921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3908}
3909
3910static bool is_callable_reference_value(CBMLanguage language, TSNode node) {
3911 const char *kind = ts_node_type(node);
3912 if (language == CBM_LANG_JAVA && strcmp(kind, "method_reference") == 0) {
3913 return true;
3914 }
3915 if (language == CBM_LANG_KOTLIN && strcmp(kind, "callable_reference") == 0) {
3916 // `Type::class` shares the callable-reference grammar node but denotes
3917 // a class literal, not a reference to executable code.
3918 return !node_has_token(node, "class");
3919 }
3920 return language == CBM_LANG_PHP && php_is_first_class_callable(node);
3921}
3922
3923static TSNode first_present_field(TSNode node, const char *const *fields) {
3924 for (const char *const *field = fields; *field; field++) {

Callers 1

handle_callsFunction · 0.85

Calls 2

node_has_tokenFunction · 0.85

Tested by

no test coverage detected