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

Function resolve_haskell_func_name

internal/cbm/extract_defs.c:420–437  ·  view source on GitHub ↗

Haskell: resolve function name from first named child (variable/name).

Source from the content-addressed store, hash-verified

418
419// Haskell: resolve function name from first named child (variable/name).
420static TSNode resolve_haskell_func_name(TSNode node) {
421 if (ts_node_named_child_count(node) > 0) {
422 TSNode head = ts_node_named_child(node, 0);
423 const char *hk = ts_node_type(head);
424 if (strcmp(hk, "variable") == 0 || strcmp(hk, "name") == 0) {
425 return head;
426 }
427 if (ts_node_named_child_count(head) > 0) {
428 TSNode v = ts_node_named_child(head, 0);
429 const char *vk = ts_node_type(v);
430 if (strcmp(vk, "variable") == 0 || strcmp(vk, "name") == 0) {
431 return v;
432 }
433 }
434 }
435 TSNode null_node = {0};
436 return null_node;
437}
438
439// CommonLisp: resolve defun name from function_name field or defun_header→sym_lit.
440static TSNode resolve_commonlisp_func_name(TSNode node) {

Callers 1

resolve_func_name_fpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected