diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -245,11 +245,11 @@ Node *parse_expr(Lexer *l, Proc *p) { lex_next(l); /* necessary because if lhs is a deduplicated literal, it may be an input to rhs * and therefore culled by peephole optimizations */ - node_add(p, lhs, p->keepalive); - Node *rhs = parse_expr(l, p); - Node *n = node_peephole(node_new(p, nt, lhs, rhs), p, l); - node_remove(p, lhs, p->keepalive); - lhs = n; + Node *rhs; + NODE_KEEP(p, lhs, { + rhs = parse_expr(l, p); + }); + lhs = node_peephole(node_new(p, nt, lhs, rhs), p, l); } lhs->src_pos = (LexSpan) { pos.ofs, l->pos.ofs - pos.ofs }; return lhs; |
