The name a declarator declares (through pointers, arrays, functions and * parentheses). */
| 561 | /* The name a declarator declares (through pointers, arrays, functions and |
| 562 | * parentheses). */ |
| 563 | static TSNode c_declarator_name(TSNode d) { |
| 564 | for (int guard = 0; guard < CBM_SZ_32 && !ts_node_is_null(d); guard++) { |
| 565 | if (c_kind(d, "identifier") || c_kind(d, "type_identifier")) { |
| 566 | return d; |
| 567 | } |
| 568 | TSNode inner = ts_node_child_by_field_name(d, TS_FIELD("declarator")); |
| 569 | if (ts_node_is_null(inner)) { |
| 570 | inner = ts_node_named_child(d, 0); /* a parenthesized declarator */ |
| 571 | } |
| 572 | d = inner; |
| 573 | } |
| 574 | return (TSNode){0}; |
| 575 | } |
| 576 | |
| 577 | static bool c_is_static(const char *src, TSNode decl) { |
| 578 | uint32_t nc = ts_node_named_child_count(decl); |
no test coverage detected