Skip to main content

syntax_node_to_token_tree_modified

Function syntax_node_to_token_tree_modified 

Source
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,
) -> TopSubtree
where 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.