Function difft::parse::tree_sitter_parser::parse_subtrees
source · [−]pub(crate) fn parse_subtrees(
src: &str,
config: &TreeSitterConfig,
tree: &Tree
) -> HashMap<usize, (Tree, TreeSitterConfig, HighlightedNodeIds), BuildHasherDefault<FxHasher>>
Expand description
Find any nodes that can be parsed as other languages (e.g. JavaScript embedded in HTML), and return a map of their node IDs mapped to parsed trees. Every time we see such a node, we will ignore it and recurse into the root node of the given tree instead.