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

Function sig_leaf

internal/cbm/callable_sig.c:131–144  ·  view source on GitHub ↗

Whether a leaf is emitted: C-family nested parameter lists spell their * declarators without the parameter names. */

Source from the content-addressed store, hash-verified

129/* Whether a leaf is emitted: C-family nested parameter lists spell their
130 * declarators without the parameter names. */
131static void sig_leaf(sig_ctx_t *c, TSNode n) {
132 const char *kind = ts_node_type(n);
133 if (c->skip_names &&
134 (strcmp(kind, "identifier") == 0 || strcmp(kind, "field_identifier") == 0)) {
135 return;
136 }
137 uint32_t s = ts_node_start_byte(n);
138 uint32_t e = ts_node_end_byte(n);
139 if (e - s == 3 && memcmp(c->src + s, "...", 3) == 0) {
140 sig_raw_str(c, sig_variadic_marker(c->lang));
141 return;
142 }
143 sig_token(c, c->src + s, e - s);
144}
145
146/* Render every leaf token of a type subtree, in order, with a cursor walk
147 * bounded at SIG_DEPTH_LIMIT. C# tuple element names are not part of the

Callers 1

sig_type_tokensFunction · 0.85

Calls 3

sig_raw_strFunction · 0.85
sig_variadic_markerFunction · 0.85
sig_tokenFunction · 0.85

Tested by

no test coverage detected