deep_clone_node

Function deep_clone_node 

Source
pub fn deep_clone_node<'a, L: Language>(
    node: &'a GreenNode<'a, L>,
    arena: &'a SyntaxArena,
) -> &'a GreenNode<'a, L>
Expand description

Helper function to perform deep clone of a node into an arena.

This is used to “promote” nodes from a previous generation’s arena to the current one, ensuring that the new tree is self-contained and has good memory locality.