| 2110 | } |
| 2111 | |
| 2112 | static 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. */ |
no test coverage detected