pub fn syntax_node_to_token_tree_modified<Ctx, SpanMap, OnEvent>(
node: &SyntaxNode,
map: SpanMap,
append: FxHashMap<SyntaxElement, Vec<Leaf<SpanData<Ctx>>>>,
remove: FxHashSet<SyntaxElement>,
call_site: SpanData<Ctx>,
mode: DocCommentDesugarMode,
on_enter: OnEvent,
) -> TopSubtree<SpanData<Ctx>>where
SpanMap: SpanMapper<SpanData<Ctx>>,
SpanData<Ctx>: Copy + Debug,
OnEvent: FnMut(&mut PreorderWithTokens, &WalkEvent<SyntaxElement>) -> (bool, Vec<Leaf<SpanData<Ctx>>>),Expand description
Converts a syntax tree to a tt::Subtree using the provided span map to populate the
subtree’s spans. Additionally using the append and remove parameters, the additional tokens can
be injected or hidden from the output.