-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Edition dependent parser #16324
Comments
14 tasks
@rustbot claim |
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Apr 20, 2024
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros Follow up to rust-lang/rust-analyzer#16450, cc rust-lang/rust-analyzer#16324
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Jul 28, 2024
Edition aware parser Fixes rust-lang/rust-analyzer#16324 by allowing us to properly thread through the edition to the parser
RalfJung
pushed a commit
to RalfJung/rust
that referenced
this issue
Aug 1, 2024
Edition aware parser Fixes rust-lang/rust-analyzer#16324 by allowing us to properly thread through the edition to the parser
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Aug 2, 2024
Edition aware parser Fixes rust-lang/rust-analyzer#16324 by allowing us to properly thread through the edition to the parser
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our parser currently assumes the latest edition (+ a small hack to be able to parse the standard libraries try macro, although that's not really useful anymore). We should fix this!
This is gonna be 2 main tasks:
The first point should be fairly trivial I believe, it's just adding an edition field to the
Parser
struct and then some special branching and recognizing certain keywords based on edition etc.The second one is going to be more tricky, as for one, anywhere where we execute the parse query we will have to now supply an edition, similarly we have to do this for whenever we parse a macro expansion. The edition for a normal file parse is gonna be decided by the crate's edition the file belongs to, the edition for a macro parse on the other hand depends on the edition of the crate that the macro definition belongs to (I think).
So with that said, the first point is a rather simple change, the second will be more invasive.
The text was updated successfully, but these errors were encountered: