| Crates.io | quote_precise |
| lib.rs | quote_precise |
| version | 0.0.9 |
| created_at | 2020-07-21 21:10:48.470736+00 |
| updated_at | 2021-03-09 23:02:04.361985+00 |
| description | A quote implementation that preserves meaningful span locations |
| homepage | |
| repository | https://github.com/andrew-johnson-4/quote_precise |
| max_upload_size | |
| id | 267776 |
| size | 16,480 |
A version of quote that preserves Span locations
//junk Spans
let t: Token![!] = parse_quote! { ! };
println!("{:?}:{:?}-{:?}", t.span, t.span.start(), t.span.end());
//useful Spans
let t: Token![!] = parse_quote_precise! { ! };
println!("{:?}:{:?}-{:?}", t.span, t.span.start(), t.span.end());
assert_ne!(
t.span.start(),
t.span.end()
)
Waiting on proc_macro::Span to stabilize a bit more to see if further work on this crate is not entirely redundant effort.