Skip to content

TokenStream to source code while preserving white-space

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mashedcode/proc-macro2-whitespace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proc-macro2-whitespace

Usage

[dependescies]
proc-macro2-whitespace = { git = "https://github.com/mashedcode/proc-macro2-whitespace" }

Example

use proc_macro2_whitespace::IntoCode;

let code = "pub fn foo() {\n    let foo = 'a';\n\n    let bar = 'b';\n}\n";
let stream = code.parse::<proc_macro2::TokenStream>().unwrap();
assert_eq!(stream.into_code().unwrap(), code);

License

This project is licensed under either of

at your option.

About

TokenStream to source code while preserving white-space

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages