| 547 | |
| 548 | |
| 549 | static te_expr *expr(state *s) { |
| 550 | /* <expr> = <term> {("+" | "-") <term>} */ |
| 551 | te_expr *ret = term(s); |
| 552 | CHECK_NULL(ret); |
| 553 | |
| 554 | while (s->type == TOK_INFIX && (s->function == add || s->function == sub)) { |
| 555 | te_fun2 t = s->function; |
| 556 | next_token(s); |
| 557 | te_expr *te = term(s); |
| 558 | CHECK_NULL(te, te_free(ret)); |
| 559 | |
| 560 | te_expr *prev = ret; |
| 561 | ret = NEW_EXPR(TE_FUNCTION2 | TE_FLAG_PURE, ret, te); |
| 562 | CHECK_NULL(ret, te_free(te), te_free(prev)); |
| 563 | |
| 564 | ret->function = t; |
| 565 | } |
| 566 | |
| 567 | return ret; |
| 568 | } |
| 569 | |
| 570 | |
| 571 | static te_expr *list(state *s) { |
no test coverage detected