y21 / minipath

Minimal Rust type and path syntax parser, for when `syn` is too big

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minipath

A minimal Rust type and path syntax parser, for when syn is too big.

Usage

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let input = "<fn(*const dyn SomeTrait) -> ! as Function>::Output";
    let (_, path) = minipath::parse_path(input)?;
    println!("{path:#?}");

    Ok(())
}

About

Minimal Rust type and path syntax parser, for when `syn` is too big


Languages

Language:Rust 100.0%