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

Function php_namespace_rec

internal/cbm/doclink_php.c:843–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841}
842
843static void php_namespace_rec(php_walk_t *w, TSNode def, uint32_t first, uint32_t last) {
844 TSNode name = ts_node_child_by_field_name(def, TS_FIELD("name"));
845 w->ns = "";
846 w->ns_len = 0;
847 if (!ts_node_is_null(name)) {
848 w->ns = php_name_text(w, name, &w->ns_len);
849 if (w->ns_len && w->ns[0] == '\\') {
850 w->ns++;
851 w->ns_len--;
852 }
853 }
854 php_sb_puts(w->sb, "\nN");
855 php_sb_num(w->sb, (uint32_t)w->blk);
856 php_sb_field(w->sb, w->ns, w->ns_len);
857 php_sb_num(w->sb, first);
858 php_sb_num(w->sb, last);
859}
860
861static void php_walk_blocks(php_walk_t *w, const TSNode *kids, int n, uint32_t file_last) {
862 int first_ns = CBM_NOT_FOUND;

Callers 1

php_walk_blocksFunction · 0.85

Calls 4

php_name_textFunction · 0.85
php_sb_putsFunction · 0.85
php_sb_numFunction · 0.85
php_sb_fieldFunction · 0.85

Tested by

no test coverage detected