| 575 | } |
| 576 | |
| 577 | static bool c_is_static(const char *src, TSNode decl) { |
| 578 | uint32_t nc = ts_node_named_child_count(decl); |
| 579 | for (uint32_t i = 0; i < nc; i++) { |
| 580 | TSNode c = ts_node_named_child(decl, i); |
| 581 | if (!c_kind(c, "storage_class_specifier")) { |
| 582 | continue; |
| 583 | } |
| 584 | uint32_t b = ts_node_start_byte(c); |
| 585 | uint32_t e = ts_node_end_byte(c); |
| 586 | if (e - b == CBM_SZ_6 && memcmp(src + b, "static", CBM_SZ_6) == 0) { |
| 587 | return true; |
| 588 | } |
| 589 | } |
| 590 | return false; |
| 591 | } |
| 592 | |
| 593 | /* The names a static declaration or definition declares. */ |
| 594 | static void c_static_names(CBMExtractCtx *ctx, CBMHashTable *names, TSNode decl) { |
no test coverage detected