| 573 | |
| 574 | |
| 575 | static te_expr *expr(state *s) { |
| 576 | /* <expr> = <term> {("+" | "-") <term>} */ |
| 577 | te_expr *ret = term(s); |
| 578 | CHECK_NULL(ret); |
| 579 | |
| 580 | while (s->type == TOK_INFIX && (s->function == add || s->function == sub)) { |
| 581 | te_fun2 t = s->function; |
| 582 | next_token(s); |
| 583 | te_expr *te = term(s); |
| 584 | CHECK_NULL(te, te_free(ret)); |
| 585 | |
| 586 | te_expr *prev = ret; |
| 587 | ret = NEW_EXPR(TE_FUNCTION2 | TE_FLAG_PURE, ret, te); |
| 588 | CHECK_NULL(ret, te_free(te), te_free(prev)); |
| 589 | |
| 590 | ret->function = t; |
| 591 | } |
| 592 | |
| 593 | return ret; |
| 594 | } |
| 595 | |
| 596 | |
| 597 | static te_expr *list(state *s) { |
no test coverage detected