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

Function jv_java_components

internal/cbm/doclink_jvm.c:2231–2249  ·  view source on GitHub ↗

The components of a record are its fields; each keeps its type, which is * the canonical constructor's signature. */

Source from the content-addressed store, hash-verified

2229/* The components of a record are its fields; each keeps its type, which is
2230 * the canonical constructor's signature. */
2231static void jv_java_components(jv_scan_t *s, TSNode decl, const jv_frame_t *fr) {
2232 TSNode params = jv_field(decl, "parameters");
2233 uint32_t nc = ts_node_is_null(params) ? 0 : ts_node_named_child_count(params);
2234 for (uint32_t i = 0; i < nc; i++) {
2235 TSNode p = ts_node_named_child(params, i);
2236 if (!jv_kind(p, "formal_parameter")) {
2237 continue;
2238 }
2239 char norm[CBM_SZ_256];
2240 TSNode ty = jv_field(p, "type");
2241 if (ts_node_is_null(ty) || ts_node_end_byte(ty) > s->src_len) {
2242 snprintf(norm, sizeof(norm), "?");
2243 } else {
2244 uint32_t a = ts_node_start_byte(ty);
2245 cbm_doclink_java_norm_type(s->src + a, ts_node_end_byte(ty) - a, norm, sizeof(norm));
2246 }
2247 jv_emit_value(s, jv_line(p), jv_field(p, "name"), "p", norm, fr);
2248 }
2249}
2250
2251static void jv_java_import(jv_scan_t *s, TSNode decl) {
2252 if (s->lexical && (ts_node_start_byte(decl) >= s->untrusted || ts_node_has_error(decl))) {

Callers 1

jv_java_typeFunction · 0.85

Calls 5

jv_fieldFunction · 0.85
jv_kindFunction · 0.85
jv_emit_valueFunction · 0.85
jv_lineFunction · 0.85

Tested by

no test coverage detected