Splicing on tree-like structures