MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / php_use_kind

Function php_use_kind

internal/cbm/doclink_php.c:459–474  ·  view source on GitHub ↗

`function` or `const` among a node's anonymous children: 'f', 'k', else * `dflt`. */

Source from the content-addressed store, hash-verified

457/* `function` or `const` among a node's anonymous children: 'f', 'k', else
458 * `dflt`. */
459static 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
476static 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) {

Callers 2

php_use_clauseFunction · 0.70
php_use_declFunction · 0.70

Calls 1

php_kindFunction · 0.85

Tested by

no test coverage detected