Commit graph

6 commits

Author SHA1 Message Date
Lukas Wirth
4502a602a7 internal: Lay basic ground work for standalone mbe tests 2024-09-01 12:42:44 +02:00
Chayim Refael Friedman
9d3368f2c2 Properly account for editions in names
This PR touches a lot of parts. But the main changes are changing
`hir_expand::Name` to be raw edition-dependently and only when necessary
(unrelated to how the user originally wrote the identifier),
and changing `is_keyword()` and `is_raw_identifier()` to be edition-aware
(this was done in #17896, but the FIXMEs were fixed here).

It is possible that I missed some cases, but most IDE parts should properly
escape (or not escape) identifiers now.

The rules of thumb are:

 - If we show the identifier to the user, its rawness should be determined
   by the edition of the edited crate. This is nice for IDE features,
   but really important for changes we insert to the source code.
 - For tests, I chose `Edition::CURRENT` (so we only have to (maybe) update
   tests when an edition becomes stable, to avoid churn).
 - For debugging tools (helper methods and logs), I used `Edition::LATEST`.
2024-08-16 16:46:24 +03:00
Lukas Wirth
f90bdfc13d internal: Properly check the edition for edition dependent syntax kinds 2024-08-15 15:57:47 +02:00
Vincent Esche
b8cf3c48f3 Add missing [package.description] for 'syntax-bridge' crate 2024-08-07 19:58:13 +02:00
Vincent Esche
a966f6ec31 Make 'syntax-bridge' crate inherit [package.repository] from workspace 2024-08-07 19:57:59 +02:00
Lukas Wirth
d2dd4f6d5f Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00