aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
Commit message (Collapse)AuthorAgeFilesLines
* Bump rustc_lexerLaurențiu Nicola2021-02-021-1/+1
|
* Fix ast::String::value not properly escaping in some casesLukas Wirth2021-01-301-2/+19
|
* Bump depsLaurențiu Nicola2021-01-271-1/+1
|
* :arrow_up: rowanAleksey Kladov2021-01-251-1/+1
|
* Add validation for mutable const itemsLukas Wirth2021-01-245-24/+39
|
* Up lexerkjeremy2021-01-211-1/+1
|
* :arrow_up: rowanAleksey Kladov2021-01-205-12/+8
| | | | It now stores text inline with tokens
* .Aleksey Kladov2021-01-196-18/+18
|
* :arrow_up: rowanAleksey Kladov2021-01-193-5/+6
|
* Parse `impl const Trait`Lukas Wirth2021-01-182-0/+25
|
* Add `MacroType` syntaxJonas Schievink2021-01-181-2/+31
|
* Merge #7291bors[bot]2021-01-1815-67/+147
|\ | | | | | | | | | | | | | | 7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril That should be the remaining special casing for `self` 🎉 Co-authored-by: Lukas Wirth <[email protected]>
| * Wrap remaining self/super/crate in Name{Ref}Lukas Wirth2021-01-1515-67/+147
| |
* | When building an item-tree, keep fewer nodes in memoryAleksey Kladov2021-01-161-1/+1
| |
* | Add Unmerge Use assistunexge2021-01-151-2/+6
|/
* Merge #7288bors[bot]2021-01-1521-41/+87
|\ | | | | | | | | | | | | | | | | | | 7288: Handle self/super/crate in PathSegment as NameRef r=matklad a=Veykril Wrapping self/super/crate in NameRef as per https://github.com/rust-analyzer/rust-analyzer/pull/7261#issuecomment-760023172 Co-authored-by: Lukas Wirth <[email protected]>
| * Handle self/super/crate in PathSegment as NameRefLukas Wirth2021-01-1521-41/+87
| |
* | Merge #7287bors[bot]2021-01-151-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 7287: Make SyntaxPtr lookup logarithmic r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Make SyntaxPtr lookup logarithmicAleksey Kladov2021-01-151-1/+1
| | | | | | | | | | | | | | | | | | closes #3934 cc https://github.com/rust-analyzer/rowan/pull/81
* | | Merge #7286bors[bot]2021-01-152-8/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | 7286: Remove useless wrapper r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Remove useless wrapperAleksey Kladov2021-01-152-8/+3
| |/
* | Add test for yield_exprDaiki Ihara2021-01-152-0/+32
| |
* | Add support for yiled keywordDaiki Ihara2021-01-151-1/+33
|/
* Introduce more appropriate assertion mechanismAleksey Kladov2021-01-141-1/+1
| | | | | | | rust-analyzer is a long-running program, so we *should* handle assertion failures. See also https://www.sqlite.org/assert.html.
* Merge #7218bors[bot]2021-01-106-58/+58
|\ | | | | | | | | | | | | | | 7218: Fix typos r=Veykril a=regexident Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking. Co-authored-by: Vincent Esche <[email protected]>
| * Updated tests via `cargo xtask codegen`Vincent Esche2021-01-102-50/+50
| |
| * Fixed typos in local bindingsVincent Esche2021-01-091-2/+2
| |
| * Fixed typos in code assertsVincent Esche2021-01-091-1/+1
| |
| * Fixed typos in code commentsVincent Esche2021-01-092-5/+5
| |
* | Merge #7239bors[bot]2021-01-101-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 7239: Replace SyntaxKind usage with T! macro where applicable r=lnicola a=Veykril https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#token-names Co-authored-by: Lukas Wirth <[email protected]>
| * | Replace SyntaxKind usage with T! macro where applicableLukas Wirth2021-01-101-1/+1
| | |
* | | Fix typo, parentheses is pluralLaurențiu Nicola2021-01-101-2/+2
|/ /
* / Allow `true` and `false` keywords in const genericsCallym2021-01-102-10/+20
|/
* Change <|> to $0 - RebaseKevaundray Wedderburn2021-01-072-29/+29
|
* Rename expr -> tail_exprAleksey Kladov2021-01-052-2/+2
|
* Update crateskjeremy2021-01-041-1/+1
|
* Merge #6587bors[bot]2021-01-0430-0/+227
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6587: SSR: Support statement matching and replacing r=davidlattimore a=MarijnS95 For #3186 Hi! This is a smaller initial patchset that came up while working on support for statement lists (and my first time working on RA :grin:). It has me stuck on trailing semicolons for which I hope to receive some feedback. Matching (and replacing) `let` bindings with a trailing semicolon works fine, but trying to omit these (to make patterns more ergonomic) turns out more complex than expected. The "optional trailing semicolon solution" implemented in this PR is ugly because `Matcher::attempt_match_token` should only consume a trailing `;` when parsing `let` bindings to prevent other code from breaking. That at the same time has a nasty side-effect of `;` ending up in the matched code: any replacements on that should include the trailing semicolon as well even if it was not in the pattern. A better example is in the tests: https://github.com/rust-analyzer/rust-analyzer/blob/3ae1649c24a689473b874c331f5f176e5839978e/crates/ssr/src/tests.rs#L178-L184 The end result to achieve is (I guess) allowing replacement of let bindings without trailing semicolon like `let x = $a ==>> let x = 1` (but including them on both sides is still fine), and should make replacement in a macro call (where `foo!(let a = 2;)` for a `$x:stmt` is invalid syntax) possible as well. That should allow to enable/fix these tests: https://github.com/rust-analyzer/rust-analyzer/blob/3ae1649c24a689473b874c331f5f176e5839978e/crates/ssr/src/tests.rs#L201-L214 A possible MVP of this PR might be to drop this optional `;' handling entirely and only allow an SSR pattern/template with semicolons on either side. Co-authored-by: Marijn Suijten <[email protected]>
| * parser,syntax: Add separate parser for stmt with optional semicolonMarijn Suijten2021-01-0313-5/+66
| | | | | | | | | | Adjusting `grammar::fragments::stmt` to Optional or Yes will break original functionality and tests.
| * syntax,ssr: Implement statement parsingMarijn Suijten2021-01-0330-0/+166
| |
* | Upgrade expect-test to 1.1Jesse Bakker2021-01-031-1/+1
|/
* Fix warnings on rust-nightlycynecx2021-01-021-2/+2
|
* Update crateskjeremy2020-12-301-1/+1
|
* indentationAdnoC2020-12-301-3/+3
|
* Smarter bracketed use diagnosticAdnoC2020-12-301-0/+8
|
* Merge #7027bors[bot]2020-12-242-0/+59
|\ | | | | | | | | | | | | | | 7027: Fix macro_rules not accepting brackets or parentheses r=matklad,lnicola a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * Fix macro_rules not accepting brackets or parenthesesLukas Wirth2020-12-242-0/+59
| |
* | Merge #7020bors[bot]2020-12-231-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 7020: Implement const pat and expr inference r=flodiebold a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * | Implement const block inferenceLukas Wirth2020-12-231-0/+4
| |/
* | Merge #7016bors[bot]2020-12-231-1/+1
|\ \ | |/ |/| | | | | | | | | | | 7016: Bump deps r=flodiebold a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * Bump rustc_lexerLaurențiu Nicola2020-12-231-1/+1
| |