about summary refs log tree commit diff
path: root/crates/syntax/src/ast
AgeCommit message (Collapse)AuthorLines
2021-09-16assists: turn while into loopAndrzej Głuszak-0/+5
2021-09-04fix: use placeholder as default type in `Generate function`.Dawer-0/+3
2021-09-01Fix extract_function with macro argDaiki Ihara-0/+5
2021-08-24internal: more declarative re-indentation APIAleksey Kladov-7/+8
2021-08-18minor: address review commentsDawer-8/+6
2021-08-18internal: introduce in-place indenting APIDawer-18/+61
2021-08-14minor: move functionality to a better placeAleksey Kladov-26/+30
2021-08-14internal: remove one more usage of old editing API.Aleksey Kladov-13/+17
2021-08-14internal: remove a remnant of old editing infraAleksey Kladov-28/+2
2021-08-14internal: merge hir::BinaryOp and ast::BinOpAleksey Kladov-193/+102
2021-08-14internal: prepare to merge hir::BinaryOp and ast::BinOpAleksey Kladov-5/+90
2021-08-14internal: make naming consistentAleksey Kladov-6/+6
2021-08-14internal: prepare a dedicated module for all operatorsAleksey Kladov-25/+29
2021-08-13Support `if let` match guardsJonas Schievink-0/+3
2021-08-12add `make::ext::path_from_idents`Yoshua Wuyts-0/+12
2021-08-10wip enum record/tuple generationYoshua Wuyts-0/+12
2021-08-10add make::expr_opYoshua Wuyts-0/+39
2021-08-09generate method assistmahdi-frms-0/+4
2021-08-08Merge #9814bors[bot]-0/+6
9814: Generate default impl when converting `#[derive(Debug)]` to manual impl r=yoshuawuyts a=yoshuawuyts This patch makes it so when you convert `#[derive(Debug)]` to a manual impl, a default body is provided that's equivalent to the original output of `#[derive(Debug)]`. This should make it drastically easier to write custom `Debug` impls, especially when all you want to do is quickly omit a single field which is `!Debug`. This is implemented for enums, record structs, tuple structs, empty structs - and it sets us up to implement variations on this in the future for other traits (like `PartialEq` and `Hash`). Thanks! ## Codegen diff This is the difference in codegen for record structs with this patch: ```diff struct Foo { bar: String, } impl fmt::Debug for Foo { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - todo!(); + f.debug_struct("Foo").field("bar", &self.bar).finish() } } ``` Co-authored-by: Irina Shestak <shestak.irina@gmail.com> Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com> Co-authored-by: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
2021-08-08Implement if_to_bool_then assistLukas Wirth-0/+4
2021-08-08generate Debug for enumsYoshua Wuyts-0/+3
2021-08-08debug for record field structsYoshua Wuyts-0/+3
2021-08-07SimplifyLukas Wirth-2/+16
2021-08-05Merge #9790bors[bot]-1/+19
9790: fix: extract_type_alias extracts generics correctly r=Veykril a=Veykril Fixes #8335 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-05extract_type_alias extracts generics correctlyLukas Wirth-1/+19
2021-08-03tree-wide: fix rustdoc warnings, add some linksJade-2/+2
2021-07-31Wrap inner tail expressions in MissingOkOrSomeInTailExprLukas Wirth-0/+1
2021-07-31add_explicit_type is applicable for closure parametersLukas Wirth-3/+35
2021-07-30Merge #9727bors[bot]-101/+118
9727: internal: Simplify extract_function assist r=Veykril a=Veykril also fixes #7839(blocked on #9728) Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-30Merge #9728bors[bot]-9/+5
9728: fix: Attach comma token to MATCH_ARM instead of MATCH_ARM_LIST r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-30Fix assists assuming comma belonging to MATCH_ARM_LISTLukas Wirth-9/+5
2021-07-29Simplify extract_function assistLukas Wirth-101/+118
2021-07-29Use more strictly typed syntax nodes for analysis in extract_function assistLukas Wirth-0/+75
2021-07-21Fix some more basic clippy lintsLukas Wirth-1/+1
2021-07-18Support GATs for associated type arg parsingLukas Wirth-25/+26
2021-07-10Respect coercions in `inline_call`Lukas Wirth-4/+13
2021-07-09fix: Adding async keyword when await is present in generate_function assistvi_mi-2/+5
2021-07-05Merge #9474bors[bot]-0/+15
9474: fix: Inline parameters in `inline_call` if possible r=Veykril a=Veykril Fixes #9491 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-03Merge #9476bors[bot]-2/+2
9476: internal: overhaul codegen r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-03internal: overhaul code generationAleksey Kladov-2/+2
* Keep codegen adjacent to the relevant crates. * Remove codgen deps from xtask, speeding-up from-source installation. This regresses the release process a bit, as it now needs to run the tests (and, by extension, compile the code).
2021-07-03Inline parameters in `inline_call` if possibleLukas Wirth-0/+15
2021-07-03Merge the inline function/method assists into `inline_call`Lukas Wirth-2/+1
2021-07-03feat: Implement `inline_method` assistLukas Wirth-11/+17
2021-07-02`replace_match_with_if_let` works on more binary matchesLukas Wirth-0/+4
2021-07-01Merge #9458bors[bot]-3/+10
9458: minor: Remove make::match_arm_with_guard r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-02Remove make::match_arm_with_guardLukas Wirth-3/+10
2021-07-01Merge #9455bors[bot]-0/+13
9455: feat: Handle not let if expressions in replace_if_let_with_match r=Veykril a=Veykril Transforms bare `if cond {}` into `_ if cond` guard patterns in the match as long as at least one `if let` is in the if chain, otherwise the assist wont be applicable. bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-02Handle not let if expressions in replace_if_let_with_matchLukas Wirth-0/+13
2021-06-30Don't classify NameRef paths inside attribute TokenTreesLukas Wirth-0/+8
2021-06-27Deduplicate ast expression walking logicLukas Wirth-1/+51