IASTNode newNode = parentModification.getNewNode();
final T appendedTNode = cast(newNode, clazz);
if (appendedTNode != null) {
modifiedChildren.add(appendedTNode);
} else if (newNode instanceof ContainerNode) {
final ContainerNode nodeContainer = (ContainerNode) newNode;
for (final IASTNode currentNode : nodeContainer.getNodes()) {
final T tnode = cast(currentNode, clazz);
if (tnode != null) {
modifiedChildren.add(tnode);
}
}
}
break;
case INSERT_BEFORE:
newNode = parentModification.getNewNode();
if (newNode instanceof ContainerNode) {
final ContainerNode contNode = (ContainerNode) newNode;
for (final IASTNode node : contNode.getNodes()) {
insertNode(clazz, modifiedChildren, parentModification, node);
}
} else {
insertNode(clazz, modifiedChildren, parentModification, newNode);
}