Resolve the actual property value for a condition from a binding */
| 2340 | |
| 2341 | /* Resolve the actual property value for a condition from a binding */ |
| 2342 | static const char *resolve_condition_value(const cbm_condition_t *c, binding_t *b) { |
| 2343 | cbm_edge_t *e = binding_get_edge(b, c->variable); |
| 2344 | if (e) { |
| 2345 | return edge_prop(e, c->property); |
| 2346 | } |
| 2347 | cbm_node_t *n = binding_get(b, c->variable); |
| 2348 | if (!n) { |
| 2349 | return NULL; /* unbound variable */ |
| 2350 | } |
| 2351 | if (c->property) { |
| 2352 | return node_prop(n, c->property, b->store); |
| 2353 | } |
| 2354 | /* Bare alias (e.g. post-WITH virtual var) — use node name directly */ |
| 2355 | return n->name ? n->name : ""; |
| 2356 | } |
| 2357 | |
| 2358 | /* Evaluate a comparison operator between actual and expected strings. */ |
| 2359 | static bool eval_comparison_op(const char *op, const char *actual, const char *expected) { |
no test coverage detected