throw new TsurgeonRuntimeException("Attempted to replace a root node with more than one node, unable to proceed");
}
return childMatcher[1].evaluate(tree, tregex);
}
Tree parent = oldNode.parent(tree);
int i = parent.objectIndexOf(oldNode);
parent.removeChild(i);
for (int j = 1; j < children.length; ++j) {
Tree newNode = childMatcher[j].evaluate(tree, tregex);
parent.insertDtr(newNode.deepCopy(), i + j - 1);
}