You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I randomly stumbled upon this section of the reference talking about how all literal tokens can have suffixes, not only number literals. I wasn't aware of that at all. Rust errors if such a token ever ends up in actual Rust code, but they are valid as input to proc macros.
This library should support those.
The text was updated successfully, but these errors were encountered:
I second this. And further, I think that litrs should aspire to this invariant: every valid proc_macro2::Literal that parses from source should validly parse into a litrs::Literal.
Yes, in principle I want litrs to exactly accept what the Rust compiler accepts. I don't want any grammar difference. However, (a) proc_macro2 is an external crate so there can be differences to the compiler, and (b) the actual Rust token grammar is not as fixed and perfect as one hopes. For example, see this PR I once created. There are a couple of these case that you only notice when you really get into the details.
Anyway, non-number suffixes I certainly want. I personally did not need them yet and haven't found the time to implement it here, but it will happen eventually. If you need that now and wanna send a PR, that'd be welcome as well ;-)
I randomly stumbled upon this section of the reference talking about how all literal tokens can have suffixes, not only number literals. I wasn't aware of that at all. Rust errors if such a token ever ends up in actual Rust code, but they are valid as input to proc macros.
This library should support those.
The text was updated successfully, but these errors were encountered: