ra_ap_syntax_bridge

Function token_tree_to_syntax_node

Source
pub fn token_tree_to_syntax_node<Ctx>(
    tt: &TopSubtree<SpanData<Ctx>>,
    entry_point: TopEntryPoint,
    edition: Edition,
) -> (Parse<SyntaxNode>, SpanMap<Ctx>)
where SpanData<Ctx>: Copy + Debug, Ctx: PartialEq,
Expand description

Converts a tt::Subtree back to a SyntaxNode. The produced SpanMap contains a mapping from the syntax nodes offsets to the subtree’s spans.