Skip to main content

token_tree_to_syntax_node

Function token_tree_to_syntax_node 

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