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:4541–4557  ·  view source on GitHub ↗

Dart: resolve method name from method_signature/function_signature.

Source from the content-addressed store, hash-verified

4539
4540// Dart: resolve method name from method_signature/function_signature.
4541static TSNode resolve_dart_method_name(TSNode child, const char *ck) {
4542 if (strcmp(ck, "method_signature") == 0) {
4543 TSNode func_sig = cbm_find_child_by_kind(child, "function_signature");
4544 if (!ts_node_is_null(func_sig)) {
4545 TSNode name_node = func_name_node(func_sig);
4546 if (!ts_node_is_null(name_node)) {
4547 return name_node;
4548 }
4549 return cbm_find_child_by_kind(func_sig, "identifier");
4550 }
4551 }
4552 if (strcmp(ck, "function_signature") == 0) {
4553 return cbm_find_child_by_kind(child, "identifier");
4554 }
4555 TSNode null_node = {0};
4556 return null_node;
4557}
4558
4559// Arrow function: name on parent variable_declarator/field_definition, or the
4560// 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