quote_precise

Crates.ioquote_precise
lib.rsquote_precise
version0.0.9
sourcesrc
created_at2020-07-21 21:10:48.470736
updated_at2021-03-09 23:02:04.361985
descriptionA quote implementation that preserves meaningful span locations
homepage
repositoryhttps://github.com/andrew-johnson-4/quote_precise
max_upload_size
id267776
size16,480
Andrew Johnson (andrew-johnson-4)

documentation

README

quote_precise

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.

Commit count: 17

cargo fmt