Skip to content

quote-compatible example #61

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);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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