stoically
stoically
Currently that's not possible. It might be possible to introduce an "element child hook", where you would be responsible to parse starting from the opening `` tag until and including...
I'll look into the hook either way, might even be possible to hook the whole raw element content.
The idea for this issue was to get the span just for the value, which wouldn't work for nodes that don't have a value, like fragments. Having a method for...
Getting the span for a node value is actually already possible by just calling the [`span` method on the `Expr`](https://docs.rs/syn/latest/syn/enum.Expr.html#method.span).
> Btw I saw for example NodeName straightforward implementing span method. You should consider implementing the syn::spanned::Spanned trait instead. Thanks for the hint. While reading https://docs.rs/syn/latest/syn/spanned/trait.Spanned.html, I realized that `Spanned`...
It seems to implement a span method for a whole node it'd need the https://docs.rs/proc-macro2/latest/proc_macro2/struct.Span.html#method.join method, which currently is still nightly only, since it depends on https://github.com/rust-lang/rust/issues/54725. Unless I'm missing...
@danheuck I like the idea and would be happy to review a PR for it. This could probably also help with #12, where the span would help with formatting custom...
Only thing I'm a bit unsure about is in which cases it actually makes sense to store an additional span, given that the `Expr`essions already give access to spans.
This actually doesn't work since `Node::name/value` are options. I still feel like the API could use some improvement, just not sure how. Open to suggestions.
> The API doesn't feel very rusty. I'd agree. > My suggestion here would be to do handle it like syn does. Have an Enum with the possible variants and...