clone method
Deep clones the node.
Implementation
@override
ListNode clone({required bool keepParent, I18nLocale? locale}) {
final node = ListNode(
path: path,
rawPath: rawPath,
modifiers: modifiers,
comment: comment,
entries: entries
.map((e) => e.clone(keepParent: keepParent, locale: locale))
.toList(),
);
if (keepParent && parent != null) {
node.setParent(parent!);
}
node.setGenericType(genericType);
return node;
}