Function tree_sitter::ffi::ts_tree_copy
source · pub unsafe extern "C" fn ts_tree_copy(
self_: *const TSTree
) -> *mut TSTree
Expand description
Create a shallow copy of the syntax tree. This is very fast.
You need to copy a syntax tree in order to use it on more than one thread at a time, as syntax trees are not thread safe.