- Forest old = holder[pos];
- holder[pos] = n.pending();
- if (pos==0) {
- System.arraycopy(holder, 0, r.holder, 0, holder.length);
- Forest rex = null;
- if (r.pos==1) rex = singularReductions.get(this, r);
- if (rex==null) {
- rex = r.rewrite(n.phase().getLocation());
- if (r.pos==1) singularReductions.put(this, r, rex);
- }
- n2.finish(r, rex, n.phase(), holder);
- } else {
- n2.reduce(r, pos-1, n.phase(), holder);
- }
- holder[pos] = old;
+ n.reduce(r, pos, n.phase(), holder, n2);