pub fn token_tree_to_syntax_node<Ctx>(
tt: &TopSubtree<SpanData<Ctx>>,
entry_point: TopEntryPoint,
span_to_edition: &mut dyn FnMut(Ctx) -> Edition,
top_edition: Edition,
) -> (Parse<SyntaxNode>, SpanMap<Ctx>)
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.