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

Function non_module_defs

tests/test_grammar_labels.c:297–307  ·  view source on GitHub ↗

Count def nodes that are NOT the structural file/module wrappers. */

Source from the content-addressed store, hash-verified

295
296/* Count def nodes that are NOT the structural file/module wrappers. */
297static int non_module_defs(CBMFileResult *r) {
298 int n = 0;
299 for (int i = 0; i < r->defs.count; i++) {
300 const char *l = r->defs.items[i].label;
301 if (l && strcmp(l, "Module") != 0 && strcmp(l, "File") != 0 && strcmp(l, "Folder") != 0 &&
302 strcmp(l, "Package") != 0 && strcmp(l, "Directory") != 0) {
303 n++;
304 }
305 }
306 return n;
307}
308
309/* Code / IDL grammars whose fixture contains a real definition construct
310 * (function / type / message / model / module / label) that MUST extract to at

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected