about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/syntax-bridge
AgeCommit message (Collapse)AuthorLines
2025-08-09remove `P`Deadbeef-4/+4
2025-07-31`cargo clippy --fix`Lukas Wirth-31/+29
2025-06-23Don't run doctestsChayim Refael Friedman-0/+1
2025-05-30Add some more `hir_expand::files` conversionsLukas Wirth-15/+28
2025-04-25Preallocate `parser::Input`Chayim Refael Friedman-1/+1
2025-03-23chore: Remove unused dependenciesLukas Wirth-1/+0
2025-03-15cargo fmtBenjaminBrienen-11/+13
2025-03-15chore: Remove legacy `SyntaxContextId` re-exportLukas Wirth-3/+3
2025-03-08Fix syntax fixup producing invalid punctuation¨Florian-16/+54
Fixes #19206. Fixes #18244.
2025-02-27enable doctestBenjaminBrienen-1/+0
2025-01-09Make edition per-token, not per-fileChayim Refael Friedman-26/+35
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-02Store token trees in contiguous `Vec` instead of as a treeChayim Refael Friedman-179/+111
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot. This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after. Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2024-12-29fix: Do not merge spans if they have different anchorsLukas Wirth-1/+1
2024-12-18Remove salsa from proc-macro server dep treeLukas Wirth-1/+2
2024-09-29When glueing together tokens from macros, merge their spansChayim Refael Friedman-2/+30
2024-09-18Get rid of `$crate` in expansions shown to the userChayim Refael Friedman-2/+17
Be it "Expand Macro Recursively", "Inline macro" or few other things. We replace it with the crate name, as should've always been.
2024-09-01internal: Lay basic ground work for standalone mbe testsLukas Wirth-0/+135
2024-08-16Properly account for editions in namesChayim Refael Friedman-4/+1
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-15internal: Properly check the edition for edition dependent syntax kindsLukas Wirth-7/+6
2024-08-07Add missing `[package.description]` for 'syntax-bridge' crateVincent Esche-1/+1
2024-08-07Make 'syntax-bridge' crate inherit `[package.repository]` from workspaceVincent Esche-0/+1
2024-08-05Split out syntax-bridge into a separate crateLukas Wirth-0/+1303