Count def nodes that are NOT the structural file/module wrappers. */
| 295 | |
| 296 | /* Count def nodes that are NOT the structural file/module wrappers. */ |
| 297 | static 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 |