syntax_bridge

Function syntax_node_to_token_tree_modified

Source
pub fn syntax_node_to_token_tree_modified<Ctx, SpanMap>(
    node: &SyntaxNode,
    map: SpanMap,
    append: FxHashMap<SyntaxElement, Vec<Leaf<SpanData<Ctx>>>>,
    remove: FxHashSet<SyntaxElement>,
    call_site: SpanData<Ctx>,
    mode: DocCommentDesugarMode,
) -> TopSubtree<SpanData<Ctx>>
where SpanMap: SpanMapper<SpanData<Ctx>>, SpanData<Ctx>: Copy + Debug,
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.