`function` or `const` among a node's anonymous children: 'f', 'k', else * `dflt`. */
| 457 | /* `function` or `const` among a node's anonymous children: 'f', 'k', else |
| 458 | * `dflt`. */ |
| 459 | static char php_use_kind(TSNode n, char dflt) { |
| 460 | uint32_t nc = ts_node_child_count(n); |
| 461 | for (uint32_t i = 0; i < nc; i++) { |
| 462 | TSNode c = ts_node_child(n, i); |
| 463 | if (ts_node_is_named(c)) { |
| 464 | continue; |
| 465 | } |
| 466 | if (php_kind(c, "function")) { |
| 467 | return 'f'; |
| 468 | } |
| 469 | if (php_kind(c, "const")) { |
| 470 | return 'k'; |
| 471 | } |
| 472 | } |
| 473 | return dflt; |
| 474 | } |
| 475 | |
| 476 | static void php_add_use(php_walk_t *w, char kind, const char *alias, size_t alias_len, |
| 477 | const char *name, size_t name_len) { |
no test coverage detected