Whether a leaf is emitted: C-family nested parameter lists spell their * declarators without the parameter names. */
| 129 | /* Whether a leaf is emitted: C-family nested parameter lists spell their |
| 130 | * declarators without the parameter names. */ |
| 131 | static void sig_leaf(sig_ctx_t *c, TSNode n) { |
| 132 | const char *kind = ts_node_type(n); |
| 133 | if (c->skip_names && |
| 134 | (strcmp(kind, "identifier") == 0 || strcmp(kind, "field_identifier") == 0)) { |
| 135 | return; |
| 136 | } |
| 137 | uint32_t s = ts_node_start_byte(n); |
| 138 | uint32_t e = ts_node_end_byte(n); |
| 139 | if (e - s == 3 && memcmp(c->src + s, "...", 3) == 0) { |
| 140 | sig_raw_str(c, sig_variadic_marker(c->lang)); |
| 141 | return; |
| 142 | } |
| 143 | sig_token(c, c->src + s, e - s); |
| 144 | } |
| 145 | |
| 146 | /* Render every leaf token of a type subtree, in order, with a cursor walk |
| 147 | * bounded at SIG_DEPTH_LIMIT. C# tuple element names are not part of the |
no test coverage detected