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

Function resolve_dart_method_name

internal/cbm/extract_defs.c:4533–4549  ·  view source on GitHub ↗

Dart: resolve method name from method_signature/function_signature.

Source from the content-addressed store, hash-verified

4531
4532// Dart: resolve method name from method_signature/function_signature.
4533static TSNode resolve_dart_method_name(TSNode child, const char *ck) {
4534 if (strcmp(ck, "method_signature") == 0) {
4535 TSNode func_sig = cbm_find_child_by_kind(child, "function_signature");
4536 if (!ts_node_is_null(func_sig)) {
4537 TSNode name_node = func_name_node(func_sig);
4538 if (!ts_node_is_null(name_node)) {
4539 return name_node;
4540 }
4541 return cbm_find_child_by_kind(func_sig, "identifier");
4542 }
4543 }
4544 if (strcmp(ck, "function_signature") == 0) {
4545 return cbm_find_child_by_kind(child, "identifier");
4546 }
4547 TSNode null_node = {0};
4548 return null_node;
4549}
4550
4551// Arrow function: name on parent variable_declarator/field_definition, or the
4552// key of an object-literal property — the Zustand "actions returned from a

Callers 1

resolve_method_nameFunction · 0.85

Calls 2

cbm_find_child_by_kindFunction · 0.85
func_name_nodeFunction · 0.85

Tested by

no test coverage detected