Skip to content

quote-compatible example #61

@rambip

Description

@rambip

I think it would be very valuable to have an example in the root documentation showing how to use with the quote crate.

Something like this:

fn main() {
    let rust_snippet = quote!{
        fn hello_world() {println!("hello world !")}
    };

    let abstract_file : File = syn::parse2(rust_snippet);
    let pretty_rust = prettyplease::unparse(abstract_file);

    println!(pretty_rust);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions