Count def nodes that are NOT the structural file/module wrappers. */
| 290 | |
| 291 | /* Count def nodes that are NOT the structural file/module wrappers. */ |
| 292 | static 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 |