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

Function jv_java_put_supers

internal/cbm/doclink_jvm.c:2112–2132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2110}
2111
2112static void jv_java_put_supers(jv_scan_t *s, TSNode decl) {
2113 bool first = true;
2114 TSNode sc = jv_field(decl, "superclass");
2115 uint32_t snc = ts_node_is_null(sc) ? 0 : ts_node_named_child_count(sc);
2116 if (snc > 0) {
2117 jv_put_type_name(s, ts_node_named_child(sc, snc - SKIP_ONE));
2118 first = false;
2119 }
2120 TSNode lists[] = {jv_field(decl, "interfaces"), jv_child(decl, "extends_interfaces")};
2121 for (size_t l = 0; l < sizeof(lists) / sizeof(lists[0]); l++) {
2122 TSNode tl = ts_node_is_null(lists[l]) ? lists[l] : jv_child(lists[l], "type_list");
2123 uint32_t nc = ts_node_is_null(tl) ? 0 : ts_node_named_child_count(tl);
2124 for (uint32_t i = 0; i < nc; i++) {
2125 if (!first) {
2126 jv_putc(&s->sb, '|');
2127 }
2128 jv_put_type_name(s, ts_node_named_child(tl, i));
2129 first = false;
2130 }
2131 }
2132}
2133
2134/* One declared parameter type, normalized, with the brackets that follow the
2135 * parameter's name (`int x[]`) or its ellipsis. */

Callers 1

jv_java_typeFunction · 0.85

Calls 4

jv_fieldFunction · 0.85
jv_put_type_nameFunction · 0.85
jv_childFunction · 0.85
jv_putcFunction · 0.85

Tested by

no test coverage detected