copy

abstract override fun copy(children: List<Node>): ExpressionNode

Returns a shallow copy of this node where the child nodes are replaced by children.

This method can be used to generate objects with unique object identities, for example, when constructing a Tree since Tree assumes there is no sharing.

The returned node is guaranteed to have a new object identity even if children exactly matches the children of this node, however, the nodes in children themselves are not copied. This method assumes that children contains the correct number and types of nodes.