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

Function non_module_defs

tests/test_grammar_labels.c:292–302  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected