8 releases
0.0.9 | Mar 9, 2021 |
---|---|
0.0.8 | Jul 24, 2020 |
#126 in #quote
7KB
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.
Dependencies
~82KB