A chain `a OP b OP c ...` of one associative operator is linked along the * RIGHT child: OP(a, OP(b, OP(c, ...))). The chain's length is bounded only by * the message size, so a left-deep fold would hand every walker (evaluate, * seed-selectivity, free) a tree as deep as the chain is long; linked this * way each walker follows the chain in a loop and only recurses into the * operands, whose n
| 1269 | * left-to-right short-circuit are the same as in the nested form. `next` is |
| 1270 | * the operand just parsed; `more` says whether another OP follows it. */ |
| 1271 | static void expr_chain_link(cbm_expr_t **tail, cbm_expr_type_t type, cbm_expr_t *next, bool more) { |
| 1272 | if (more) { |
| 1273 | cbm_expr_t *node = expr_binary(type, next, NULL); |
| 1274 | (*tail)->right = node; |
| 1275 | *tail = node; |
| 1276 | } else { |
| 1277 | (*tail)->right = next; |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | /* AND: not (AND not)* */ |
| 1282 | static cbm_expr_t *parse_and_expr(parser_t *p) { // NOLINT(misc-no-recursion) |
no test coverage detected