@Override
public Tree evaluate(Tree tree, TregexMatcher tregex) {
Tree nodeToInsert = childMatcher[0].evaluate(tree, tregex);
Pair<Tree,Integer> position = locationMatcher.evaluate(tree, tregex);
position.first().insertDtr(needsCopy ? nodeToInsert.deepCopy() : nodeToInsert,
position.second());
return tree;
}
}