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

Function jv_java_put_sig

internal/cbm/doclink_jvm.c:2150–2185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2148}
2149
2150static void jv_java_put_sig(jv_scan_t *s, TSNode params) {
2151 if (ts_node_is_null(params)) {
2152 return;
2153 }
2154 bool first = true;
2155 uint32_t nc = ts_node_named_child_count(params);
2156 for (uint32_t i = 0; i < nc; i++) {
2157 TSNode p = ts_node_named_child(params, i);
2158 TSNode ty = {0};
2159 int dims = 0;
2160 if (jv_kind(p, "formal_parameter")) {
2161 ty = jv_field(p, "type");
2162 TSNode d = jv_field(p, "dimensions");
2163 for (uint32_t k = ts_node_is_null(d) ? 0 : ts_node_start_byte(d);
2164 !ts_node_is_null(d) && k < ts_node_end_byte(d) && k < s->src_len; k++) {
2165 dims += s->src[k] == '[';
2166 }
2167 } else if (jv_kind(p, "spread_parameter")) {
2168 uint32_t pc = ts_node_named_child_count(p);
2169 for (uint32_t k = 0; k < pc && ts_node_is_null(ty); k++) {
2170 TSNode ch = ts_node_named_child(p, k);
2171 if (!jv_kind(ch, "modifiers")) {
2172 ty = ch;
2173 }
2174 }
2175 dims = SKIP_ONE;
2176 } else {
2177 continue; /* a receiver parameter, a comment */
2178 }
2179 if (!first) {
2180 jv_putc(&s->sb, '|');
2181 }
2182 jv_java_put_param_type(s, ty, dims);
2183 first = false;
2184 }
2185}
2186
2187static void jv_java_callable(jv_scan_t *s, TSNode decl, const char *k, const jv_frame_t *fr) {
2188 bool compact = strcmp(k, "compact_constructor_declaration") == 0;

Callers 1

jv_java_callableFunction · 0.85

Calls 4

jv_kindFunction · 0.85
jv_fieldFunction · 0.85
jv_putcFunction · 0.85
jv_java_put_param_typeFunction · 0.85

Tested by

no test coverage detected