| 315 | } |
| 316 | |
| 317 | static void sig_cs_params(sig_ctx_t *c, TSNode node) { |
| 318 | TSNode params = sig_field(node, "parameters"); |
| 319 | uint32_t count = ts_node_is_null(params) ? 0 : ts_node_child_count(params); |
| 320 | for (uint32_t i = 0; i < count; i++) { |
| 321 | TSNode p = ts_node_child(params, i); |
| 322 | const char *field = ts_node_field_name_for_child(params, i); |
| 323 | if (strcmp(ts_node_type(p), "parameter") == 0) { |
| 324 | sig_cs_param(c, p); |
| 325 | } else if (field && strcmp(field, "type") == 0) { |
| 326 | /* `params T[] rest`: the grammar inlines the parameter's type and |
| 327 | * name into the list; `params` itself does not change identity. */ |
| 328 | sig_entry_type(c, p, NULL); |
| 329 | } |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | static void sig_cs_tparams(sig_ctx_t *c, TSNode node) { |
| 334 | TSNode tp = sig_field(node, "type_parameters"); |
no test coverage detected