- if (rex==null) {
- System.arraycopy(holder, 0, position.holder, 0, holder.length);
- rex = position.rewrite(target.getLocation());
- }
- if (onlychild != null)
- reduce(onlychild, pos-1, rex, null, target);
- else
- for(GSS.Phase.Node child : parent.parents())
- reduce(child, pos-1, rex, null, target);
- } else if (pos>0) {
- if (onlychild != null)
- reduce(onlychild, pos-1, rex, null, target);
- else
- for(GSS.Phase.Node child : parent.parents())
- reduce(child, pos-1, rex, null, target);
+ System.arraycopy(holder, 0, position.holder, 0, holder.length);
+ for(int i=0; i<position.pos; i++) if (position.holder[i]==null) throw new Error("realbad");
+ Forest rex = position.rewrite(target.getLocation());
+ for(GSS.Phase.Node child : parent.parents()) finish(child, rex, target);