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

Function go_bind_node

src/pipeline/doc_links_go.c:1370–1378  ·  view source on GitHub ↗

Bind `n`, the node of a name declared once (build variants count as once). * A name that two unconstrained files of the package declare (go_free_t) is * two entities: written in a file that declares it itself (`declared_here`), * the reference means that file's own declaration, which binds only when it * is the one that has the node; written anywhere else, nothing picks one. */

Source from the content-addressed store, hash-verified

1368 * the reference means that file's own declaration, which binds only when it
1369 * is the one that has the node; written anywhere else, nothing picks one. */
1370static void go_bind_node(const go_ctx_t *c, const cbm_gbuf_node_t *n, bool twins,
1371 bool declared_here, bool exact) {
1372 if (twins && !declared_here) {
1373 go_row(c, CBM_DOCLINK_REASON_AMBIGUOUS);
1374 return;
1375 }
1376 bool other_file = n && twins && strcmp(n->file_path, c->src->rel_path) != 0;
1377 go_edge(c, other_file ? NULL : n, exact);
1378}
1379
1380/* [Name] / [pkg.Name] in package `pkg`. */
1381static void go_bind_symbol(const go_ctx_t *c, const go_pkg_t *pkg, go_str_t name, bool qualified) {

Callers 2

go_bind_symbolFunction · 0.85
go_bind_memberFunction · 0.85

Calls 2

go_rowFunction · 0.85
go_edgeFunction · 0.85

Tested by

no test coverage detected