The components of a record are its fields; each keeps its type, which is * the canonical constructor's signature. */
| 2229 | /* The components of a record are its fields; each keeps its type, which is |
| 2230 | * the canonical constructor's signature. */ |
| 2231 | static 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 | |
| 2251 | static 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))) { |
no test coverage detected