about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/syntax
AgeCommit message (Collapse)AuthorLines
2025-02-28Fix prefix adjustment hints unnecessarily introducing parensLukas Wirth-8/+11
2025-02-27fix doc testsBenjaminBrienen-3/+3
2025-02-27enable doctestBenjaminBrienen-1/+0
2025-02-25internal: Migrate `remove_unused_param` assist to `SyntaxEditor`Giga Bowser-2/+22
2025-02-25fix: Properly handle removals in `SyntaxEditor`Giga Bowser-6/+18
2025-02-25internal: Improve reporting of intersecting changesGiga Bowser-6/+140
2025-02-24Add `take()` method to `SyntaxEditor`Shoyu Vanilla-1/+6
2025-02-24Migrate some leftovers in `add_missing_match_arms`Shoyu Vanilla-1/+157
2025-02-14internal: Remove mutable syntax tree usages from `add_missing_match_arms` assistShoyu Vanilla-47/+2
2025-01-29Merge pull request #19070 from Veykril/push-wpqzmznymtrnLukas Wirth-1/+116
Remove mutable syntax tree shenanigans from adjustment hints
2025-01-29Remove mutable syntax tree shenanigans from adjustment hintsLukas Wirth-1/+116
2025-01-28Merge pull request #19015 from Wilfred/mdbookLukas Wirth-2/+2
manual: Convert to mdbook
2025-01-27feat: Implement `default-field-values`Shoyu Vanilla-1/+5
2025-01-25Skip redundant path search in `resolve_completion_edits`Lukas Wirth-1/+11
2025-01-24manual: Convert to mdbookWilfred Hughes-2/+2
Split manual.adoc into markdown files, one for each chapter. For the parts of the manual that are generated from source code doc comments, update the comments to use markdown syntax and update the code generators to write to `generated.md` files. For the weekly release, stop copying the .adoc files to the `rust-analyzer/rust-analyzer.github.io` at release time. Instead, we'll sync the manual hourly from this repository. See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226 for the sync. This PR should be merged first, and that PR needs to be merged before the next weekly release. This change is based on #15795, but rebased and updated. I've also manually checked each page for markdown syntax issues and fixed any I encountered. Co-authored-by: Lukas Wirth <lukastw97@gmail.com> Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-10Re-implement rust string highlighting via tool attributeLukas Wirth-0/+8
2025-01-08internal: Migrate `unwrap_return_type` assist to use `SyntaxEditor`Giga Bowser-3/+3
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
2025-01-08internal: Migrate `wrap_return_type` assist to use `SyntaxEditor`Giga Bowser-5/+105
2025-01-06internal: Add some pattern constructors to `SyntaxFactory`Giga Bowser-0/+26
2025-01-06internal: Add some expr constructors to `SyntaxFactory`Giga Bowser-2/+175
2025-01-06internal: Add some path constructors to `SyntaxFactory`Giga Bowser-1/+77
2025-01-06internal: `make::expr_match` should return `ast::MatchExpr`Giga Bowser-1/+1
2025-01-06internal: Generally improve `make::match_arm`Giga Bowser-11/+24
`make::match_arm` should take a single `ast::Pat`, and callers can handle creating an `ast::OrPat` if need be. It should also take a proper `ast::MatchGuard`, instead of making one itself.
2025-01-06internal: move `make::expr_unit` to `make::ext::expr_unit`Giga Bowser-7/+7
`expr_unit` is just a shortcut for a common expression, so it belongs in `make::ext`
2025-01-06internal: `make::expr_tuple` should return `ast::TupleExpr`Giga Bowser-2/+3
2025-01-06internal: `make::expr_if` should return `ast::IfExpr`Giga Bowser-1/+1
2025-01-06internal: `make::expr_prefix` should return `ast::PrefixExpr`Giga Bowser-1/+1
2025-01-06internal: Generalize `make::expr_from_text` to types which implement ↵Giga Bowser-1/+1
`Into<ast::Expr>` This will help with specializing the various `make::expr_*` functions later
2025-01-06minor: New clippy lintsLukas Wirth-7/+7
2025-01-04Support the new `CoercePointee` deriveChayim Refael Friedman-1/+19
2024-12-30Move some more AST makers to the quote macroChayim Refael Friedman-52/+56
And implement addons as necessary. There are many more makers to be moved, and I'm not completely satisfied with this (due to the ease of making a mistake in the AST structure, and slightly less but also because of the need to remember whitespaces), but this is already enough to see how this will look like.
2024-12-30Create a `quote!`-like API for crafting AST nodesChayim Refael Friedman-9/+182
Instead of messing with textual `make`. And port one `make` helper to it, for the sake of testing.
2024-12-30Generate a method for static retrieval of the SyntaxKind of a node, where ↵Chayim Refael Friedman-0/+1086
possible This will help for the quote macro for `ast::make`.
2024-12-20internal: Standardize how we take iterator parameters in `SyntaxFactory`Giga Bowser-16/+28
2024-12-18Fix AsmOption rule in rust.ungramArthur Baars-3/+1
2024-12-11minor: Add `item_static` constructor to `SyntaxFactory`Giga Bowser-1/+63
2024-12-11minor: Add `item_const` constructor to `SyntaxFactory`Giga Bowser-0/+27
2024-12-11Merge pull request #18458 from Giga-Bowser/masterLukas Wirth-6/+35
feat: Add diagnostic fix to remove unnecessary wrapper in type mismatch
2024-12-10minor: Migrate `generate_enum_variant` to `SyntaxEditor`Giga Bowser-130/+204
2024-12-10minor: Add `ty_infer` constructor to `SyntaxFactory`Giga Bowser-0/+8
2024-12-10minor: Add `whitespace` constructor to `SyntaxFactory`Giga Bowser-0/+4
2024-12-10minor: Add `item_enum` constructor to `SyntaxFactory`Giga Bowser-6/+237
I recursively added all constructors it depends on. I also changed the old `make::` constructors to support more of the grammar.
2024-12-09minor: Migrate `remove_unnecessary_wrapper` to `SyntaxEditor`Giga Bowser-0/+20
2024-12-09fix: Handle the final statement in `SyntaxFactory::block_expr` properlyGiga Bowser-6/+15
This caused a bug that was rather tricky to hunt down!
2024-12-08fix: Map new replacement nodes to their mutable equivalents in `SyntaxEditor`Giga Bowser-0/+6
2024-12-06minor: Add `token_tree` constructor to `SyntaxFactory`Giga Bowser-1/+27
2024-12-06minor: Add `expr_bin` constructor to `SyntaxFactory`Giga Bowser-0/+17
2024-12-06minor: Add `token` constructor to `SyntaxFactory`Giga Bowser-1/+5
2024-12-06fix: Don't produce `ChangedAncestor` for `SyntaxToken`sGiga Bowser-10/+52
2024-12-06fix: Properly determine `SyntaxEditor` replacement intersectionGiga Bowser-1/+1
Bordering replacements should not be considered intersecting