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

Function go_node_span

internal/cbm/doclink_go.c:1327–1339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1325}
1326
1327static const char *go_node_span(const go_scan_t *s, TSNode n, size_t *len) {
1328 *len = 0;
1329 if (ts_node_is_null(n) || !s->ctx->source) {
1330 return "";
1331 }
1332 uint32_t sb = ts_node_start_byte(n);
1333 uint32_t eb = ts_node_end_byte(n);
1334 if (eb < sb || eb > (uint32_t)s->ctx->source_len) {
1335 return "";
1336 }
1337 *len = eb - sb;
1338 return s->ctx->source + sb;
1339}
1340
1341static bool go_kind_is(TSNode n, const char *kind) {
1342 return !ts_node_is_null(n) && strcmp(ts_node_type(n), kind) == 0;

Callers 10

go_exportedFunction · 0.85
go_type_param_namesFunction · 0.85
go_type_arg_namesFunction · 0.85
go_receiver_typeFunction · 0.85
go_alias_targetFunction · 0.85
go_import_pathFunction · 0.85
go_scan_import_specFunction · 0.85
go_comment_is_build_lineFunction · 0.85
go_scan_topFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected