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

Function sig_java_params

internal/cbm/callable_sig.c:257–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255/* ── Java ──────────────────────────────────────────────────────── */
256
257static void sig_java_params(sig_ctx_t *c, TSNode node) {
258 TSNode params = sig_field(node, "parameters");
259 uint32_t count = ts_node_is_null(params) ? 0 : ts_node_named_child_count(params);
260 for (uint32_t i = 0; i < count; i++) {
261 TSNode p = ts_node_named_child(params, i);
262 const char *kind = ts_node_type(p);
263 if (strcmp(kind, "formal_parameter") == 0) {
264 sig_entry_open(c);
265 sig_label(c, NULL, 0);
266 if (sig_writes_types(c)) {
267 size_t before = c->len;
268 sig_type_tokens(c, sig_field(p, "type"));
269 if (c->len == before) {
270 sig_raw(c, "?", 1);
271 }
272 sig_type_tokens(c, sig_field(p, "dimensions")); /* C-style int a[] */
273 }
274 sig_entry_close(c);
275 } else if (strcmp(kind, "spread_parameter") == 0) {
276 TSNode type = {0};
277 uint32_t pc = ts_node_named_child_count(p);
278 for (uint32_t j = 0; j < pc; j++) {
279 TSNode ch = ts_node_named_child(p, j);
280 const char *ck = ts_node_type(ch);
281 if (strcmp(ck, "modifiers") != 0 && strcmp(ck, "variable_declarator") != 0 &&
282 !sig_skipped_kind(ck)) {
283 type = ch;
284 break;
285 }
286 }
287 sig_entry_type(c, type, sig_variadic_marker(c->lang));
288 }
289 /* receiver_parameter (`Foo this`) is not part of the signature. */
290 }
291}
292
293/* ── C# ────────────────────────────────────────────────────────── */
294

Callers 1

sig_renderFunction · 0.85

Calls 10

sig_fieldFunction · 0.85
sig_entry_openFunction · 0.85
sig_labelFunction · 0.85
sig_writes_typesFunction · 0.85
sig_type_tokensFunction · 0.85
sig_rawFunction · 0.85
sig_entry_closeFunction · 0.85
sig_skipped_kindFunction · 0.85
sig_entry_typeFunction · 0.85
sig_variadic_markerFunction · 0.85

Tested by

no test coverage detected