| 3442 | } |
| 3443 | |
| 3444 | static void scan_pattern_nodes(cbm_store_t *store, const char *project, cbm_node_pattern_t *first, |
| 3445 | cbm_node_t **out_nodes, int *out_count) { |
| 3446 | if (first->label && strchr(first->label, '|')) { |
| 3447 | scan_alternation_labels(store, project, first->label, out_nodes, out_count); |
| 3448 | } else if (first->label) { |
| 3449 | cbm_store_find_nodes_by_label(store, project, first->label, out_nodes, out_count); |
| 3450 | } else { |
| 3451 | cbm_store_find_nodes(store, project, out_nodes, out_count); |
| 3452 | } |
| 3453 | /* Apply inline property filters — free rejected nodes' strings */ |
| 3454 | if (first->prop_count > 0) { |
| 3455 | int kept = 0; |
| 3456 | for (int i = 0; i < *out_count; i++) { |
| 3457 | if (check_inline_props(&(*out_nodes)[i], first->props, first->prop_count, store)) { |
| 3458 | if (kept != i) { |
| 3459 | (*out_nodes)[kept] = (*out_nodes)[i]; |
| 3460 | } |
| 3461 | kept++; |
| 3462 | } else { |
| 3463 | node_fields_free(&(*out_nodes)[i]); |
| 3464 | } |
| 3465 | } |
| 3466 | *out_count = kept; |
| 3467 | } |
| 3468 | } |
| 3469 | |
| 3470 | /* ── Expand one pattern's relationships on a set of bindings ──── */ |
| 3471 |
no test coverage detected