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

Function go_scan_method

internal/cbm/doclink_go.c:1499–1517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499static void go_scan_method(go_scan_t *s, TSNode m) {
1500 go_sb_t generics = {.a = s->tmp};
1501 size_t recv_len = 0;
1502 const char *recv = go_receiver_type(s, ts_node_child_by_field_name(m, TS_FIELD("receiver")),
1503 &recv_len, &generics);
1504 go_push_generics(s, m, &generics);
1505 size_t len = 0;
1506 const char *name = go_exported(s, ts_node_child_by_field_name(m, TS_FIELD("name")), &len);
1507 if (!name) {
1508 return;
1509 }
1510 if (!recv) {
1511 recv = "?";
1512 recv_len = SKIP_ONE;
1513 }
1514 go_push_claim(s,
1515 cbm_arena_sprintf(s->tmp, "M\t%.*s\t%.*s", (int)recv_len, recv, (int)len, name),
1516 name, len, m);
1517}
1518
1519/* The implied name of an embedded field: the type's own name, without
1520 * pointer, package qualifier and type arguments. */

Callers 1

go_scan_declFunction · 0.85

Calls 5

go_receiver_typeFunction · 0.85
go_push_genericsFunction · 0.85
go_exportedFunction · 0.85
go_push_claimFunction · 0.85
cbm_arena_sprintfFunction · 0.70

Tested by

no test coverage detected