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

Function ts_put_nested

internal/cbm/doclink_ts.c:766–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764} ts_scope_t;
765
766static void ts_put_nested(ts_walk_t *w, TSNode decl, const ts_scope_t *in) {
767 TSNode name = ts_decl_name(decl);
768 if (!ts_kind(name, "identifier") && !ts_kind(name, "type_identifier")) {
769 return;
770 }
771 char num[CBM_SZ_32];
772 ts_sb_puts(w->sb, "\nV");
773 ts_node_field(w, name);
774 snprintf(num, sizeof(num), "%u", ts_node_start_point(decl).row + SKIP_ONE);
775 ts_sb_field(w->sb, num, strlen(num));
776 snprintf(num, sizeof(num), "%u", in->first);
777 ts_sb_field(w->sb, num, strlen(num));
778 snprintf(num, sizeof(num), "%u", in->last);
779 ts_sb_field(w->sb, num, strlen(num));
780}
781
782/* V records: every function or class declared inside a function body, with
783 * its line and the body's lines (the scope it is visible in). The graph gives

Callers 1

ts_walk_nestedFunction · 0.85

Calls 5

ts_decl_nameFunction · 0.85
ts_kindFunction · 0.85
ts_sb_putsFunction · 0.85
ts_node_fieldFunction · 0.85
ts_sb_fieldFunction · 0.85

Tested by

no test coverage detected