-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node method to get span for the whole node #14
Comments
I will link to this issue this inside of my code. Thank you. |
Btw I saw for example |
Thanks for the hint. While reading https://docs.rs/syn/latest/syn/spanned/trait.Spanned.html, I realized that |
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 rust-lang/rust#54725. Unless I'm missing a different way to construct a span from a start and end span. |
While this can't be implemented properly in stable until |
Only thing I'm a bit unsure about is in which cases it actually makes sense to store an additional span, given that the |
This should probably span all children nodes as well? Like in the case of e.g.
<><div /></>
the fragment span should be 0 to 12? Is that what you'd expect from such method, @zetanumbers?If possible add a field containing the span to node types.
The text was updated successfully, but these errors were encountered: