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

Function ts_is_decl

internal/cbm/doclink_ts.c:538–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538static bool ts_is_decl(TSNode d) {
539 static const char *const kinds[] = {"class_declaration",
540 "abstract_class_declaration",
541 "function_declaration",
542 "generator_function_declaration",
543 "function_signature",
544 "interface_declaration",
545 "type_alias_declaration",
546 "enum_declaration",
547 "internal_module",
548 "module",
549 "class",
550 NULL};
551 for (int i = 0; kinds[i]; i++) {
552 if (ts_kind(d, kinds[i])) {
553 return true;
554 }
555 }
556 return false;
557}
558
559static void ts_decl_rec(ts_walk_t *w, TSNode name, bool exported, bool dflt) {
560 ts_sb_puts(w->sb, "\nD");

Callers 1

ts_walk_declFunction · 0.85

Calls 1

ts_kindFunction · 0.85

Tested by

no test coverage detected