pub fn syntax_node_to_token_tree_modified<SpanMap, OnEvent>(
node: &SyntaxNode,
map: SpanMap,
append: FxHashMap<SyntaxElement, Vec<Leaf>>,
remove: FxHashSet<SyntaxElement>,
call_site: Span,
mode: DocCommentDesugarMode,
on_enter: OnEvent,
) -> TopSubtreewhere
SpanMap: SpanMapper,
OnEvent: FnMut(&mut PreorderWithTokens, &WalkEvent<SyntaxElement>) -> (bool, Vec<Leaf>),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.