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

Function objectscript_callee_expr

internal/cbm/extract_calls.c:4089–4103  ·  view source on GitHub ↗

ObjectScript call nodes do not expose generic `function`/`name` fields. Keep * the descriptor on the grammar-proven callee occurrence instead of falling * back to the first named child (which is a receiver for method_call and an * argument container for macro). The macro spelling itself is unnamed, so it * intentionally has no named callee occurrence to consume. */

Source from the content-addressed store, hash-verified

4087 * argument container for macro). The macro spelling itself is unnamed, so it
4088 * intentionally has no named callee occurrence to consume. */
4089static TSNode objectscript_callee_expr(TSNode node) {
4090 const char *kind = ts_node_type(node);
4091
4092 if (strcmp(kind, "class_method_call") == 0) {
4093 return cbm_find_child_by_kind(node, "method_name");
4094 }
4095 if (strcmp(kind, "method_call") == 0 || strcmp(kind, "relative_dot_method") == 0) {
4096 TSNode oref = cbm_find_child_by_kind(node, "oref_method");
4097 return ts_node_is_null(oref) ? (TSNode){0} : cbm_find_child_by_kind(oref, "method_name");
4098 }
4099 if (strcmp(kind, "extrinsic_function") == 0 || strcmp(kind, "routine_tag_call") == 0) {
4100 return cbm_find_child_by_kind(node, "line_ref");
4101 }
4102 return (TSNode){0};
4103}
4104
4105static TSNode objectscript_callee_leaf(TSNode expr) {
4106 if (ts_node_is_null(expr)) {

Callers 1

Calls 1

cbm_find_child_by_kindFunction · 0.85

Tested by

no test coverage detected