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

Function ts_source_of

internal/cbm/doclink_ts.c:456–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456static TSNode ts_source_of(TSNode stmt) {
457 TSNode s = ts_node_child_by_field_name(stmt, TS_FIELD("source"));
458 if (!ts_node_is_null(s)) {
459 return s;
460 }
461 uint32_t nc = ts_node_child_count(stmt);
462 for (uint32_t i = 0; i < nc; i++) {
463 TSNode c = ts_node_child(stmt, i);
464 if (ts_kind(c, "string")) {
465 return c;
466 }
467 }
468 return s;
469}
470
471static void ts_import_rec(ts_walk_t *w, TSNode local, char kind, TSNode src, TSNode orig) {
472 ts_sb_puts(w->sb, "\nI");

Callers 2

ts_walk_importFunction · 0.85
ts_walk_exportFunction · 0.85

Calls 1

ts_kindFunction · 0.85

Tested by

no test coverage detected