First non-empty description value among `container`'s direct pairs, scanned in config_desc_keys priority order.
| 10223 | // First non-empty description value among `container`'s direct pairs, scanned |
| 10224 | // in config_desc_keys priority order. |
| 10225 | static const char *config_container_description(CBMExtractCtx *ctx, TSNode container, |
| 10226 | const char *pair_kind) { |
| 10227 | uint32_t n = ts_node_named_child_count(container); |
| 10228 | for (const char *const *k = config_desc_keys; *k; k++) { |
| 10229 | for (uint32_t i = 0; i < n; i++) { |
| 10230 | TSNode pair = ts_node_named_child(container, i); |
| 10231 | if (strcmp(ts_node_type(pair), pair_kind) != 0) { |
| 10232 | continue; |
| 10233 | } |
| 10234 | const char *v = config_pair_value_if_key(ctx, pair, *k); |
| 10235 | if (v && v[0]) { |
| 10236 | return v; |
| 10237 | } |
| 10238 | } |
| 10239 | } |
| 10240 | return NULL; |
| 10241 | } |
| 10242 | |
| 10243 | /* #519 entry point: the file-level description a config document declares about |
| 10244 | * itself, promoted onto the Module node by cbm_extract_definitions so |
no test coverage detected