syntax_bridge

Function parse_to_token_tree

Source
pub fn parse_to_token_tree<Ctx>(
    edition: Edition,
    anchor: SpanAnchor,
    ctx: Ctx,
    text: &str,
) -> Option<TopSubtree<SpanData<Ctx>>>
where SpanData<Ctx>: Copy + Debug, Ctx: Copy,
Expand description

Convert a string to a TokenTree. The spans of the subtree will be anchored to the provided anchor with the given context.