Lukas Wirth
d644728d82
Refactor reference searching to work with the ast
2021-02-12 18:58:28 +01:00
Aleksey Kladov
61f15b72ac
Add parsing benchmark
2021-02-09 21:52:34 +03:00
Aleksey Kladov
7022ea52b5
AdtDef -> Adt
2021-02-07 14:15:02 +03:00
Vladyslav Katasonov
f102616aae
allow modifications of vars from outer scope inside extracted function
...
It currently allows only directly setting variable.
No `&mut` references or methods.
2021-02-03 23:45:03 +03:00
Lukas Wirth
6c2ce55150
Fix ast::String::value not properly escaping in some cases
2021-01-30 16:31:19 +01:00
Lukas Wirth
70d43c3faf
Add validation for mutable const items
2021-01-24 02:17:41 +01:00
Aleksey Kladov
3429b32ad1
⬆️ rowan
...
It now stores text inline with tokens
2021-01-20 14:04:53 +03:00
Aleksey Kladov
46b4f89c92
.
2021-01-20 01:56:11 +03:00
Aleksey Kladov
cd21b0e9c1
⬆️ rowan
2021-01-19 22:11:42 +03:00
Jonas Schievink
872bf09381
Add MacroType
syntax
2021-01-18 17:56:35 +01:00
bors[bot]
9daba961f2
Merge #7291
...
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 <lukastw97@gmail.com>
2021-01-18 16:13:06 +00:00
Lukas Wirth
98718e0544
Wrap remaining self/super/crate in Name{Ref}
2021-01-15 22:18:43 +01:00
unexge
a3a722de9f
Add Unmerge Use assist
2021-01-15 22:14:51 +03:00
bors[bot]
8a869e870a
Merge #7288
...
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 <lukastw97@gmail.com>
2021-01-15 18:40:47 +00:00
Lukas Wirth
cb863390f2
Handle self/super/crate in PathSegment as NameRef
2021-01-15 19:21:23 +01:00
bors[bot]
a8587f153b
Merge #7286
...
7286: Remove useless wrapper r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-15 17:16:27 +00:00
Aleksey Kladov
6dbba4d75d
Remove useless wrapper
2021-01-15 20:15:33 +03:00
Daiki Ihara
85cd3524e2
Add support for yiled keyword
2021-01-15 23:35:17 +09:00
Aleksey Kladov
8dc68ecdfc
Introduce more appropriate assertion mechanism
...
rust-analyzer is a long-running program, so we *should* handle assertion
failures.
See also https://www.sqlite.org/assert.html .
2021-01-14 18:25:19 +03:00
bors[bot]
607b9ea160
Merge #7218
...
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 <regexident@gmail.com>
2021-01-10 18:16:29 +00:00
bors[bot]
b3ae7974af
Merge #7239
...
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 <lukastw97@gmail.com>
2021-01-10 16:31:32 +00:00
Lukas Wirth
e618d12903
Replace SyntaxKind usage with T! macro where applicable
2021-01-10 17:14:01 +01:00
Laurențiu Nicola
10e7fd25fe
Fix typo, parentheses is plural
2021-01-10 17:56:53 +02:00
Vincent Esche
c8c2bd097a
Fixed typos in local bindings
2021-01-09 15:41:29 +01:00
Vincent Esche
6cd93db8a5
Fixed typos in code asserts
2021-01-09 15:41:29 +01:00
Vincent Esche
21f8239ac8
Fixed typos in code comments
2021-01-09 15:41:29 +01:00
Kevaundray Wedderburn
72b9a4fbd3
Change <|> to $0 - Rebase
2021-01-07 12:09:23 +00:00
Aleksey Kladov
f9707cde68
Rename expr -> tail_expr
2021-01-05 15:51:13 +03:00
Marijn Suijten
42da26e959
parser,syntax: Add separate parser for stmt with optional semicolon
...
Adjusting `grammar::fragments::stmt` to Optional or Yes will break
original functionality and tests.
2021-01-03 12:05:52 +01:00
Marijn Suijten
cc081b7e1c
syntax,ssr: Implement statement parsing
2021-01-03 11:29:33 +01:00
cynecx
59fe884ef5
Fix warnings on rust-nightly
2021-01-02 20:48:39 +01:00
AdnoC
ddbf484acf
indentation
2020-12-29 22:56:00 -07:00
AdnoC
6eeec5d75f
Smarter bracketed use diagnostic
2020-12-29 22:46:34 -07:00
Lukas Wirth
a142beaf01
Implement const block inference
2020-12-23 12:24:24 +01:00
bors[bot]
fd1fcf2c2e
Merge #7010
...
7010: Update ungrammar for const block patterns r=matklad a=Veykril
Fixes #6848
Adds const blocks and const block patterns to the AST and parses them.
Blocked on https://github.com/rust-analyzer/ungrammar/pull/17/ , will merge that PR there once this one gets the OK so I can remove the local ungrammar dependency path and fix the Cargo.lock.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-23 10:37:30 +00:00
Aleksey Kladov
f00f75a078
Document make
module design
2020-12-23 13:01:31 +03:00
Lukas Wirth
be7260485e
Update ungrammar for const block patterns
2020-12-23 01:26:31 +01:00
bors[bot]
c073e4f6ba
Merge #6934
...
6934: Implement `cfg_attr` handling r=jonas-schievink a=jonas-schievink
Part of https://github.com/rust-analyzer/rust-analyzer/issues/5548
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-18 19:27:18 +00:00
Jonas Schievink
08de1b4fa5
Implement RawAttr::filter
2020-12-18 18:58:42 +01:00
Aleksey Kladov
cd4a7bf36e
Minor, cleanup API
2020-12-18 19:50:00 +03:00
bors[bot]
067067a6c1
Merge #6896
...
6896: Node-ify lifetimes r=jonas-schievink a=Veykril
Let's see if this passes the tests 🤞
Depends on https://github.com/rust-analyzer/ungrammar/pull/15
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-16 17:08:03 +00:00
bors[bot]
63bbdb31e5
Merge #6897
...
6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink
This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore.
First steps for https://github.com/rust-analyzer/rust-analyzer/issues/2248 .
Blocked on https://github.com/rust-analyzer/ungrammar/pull/16 .
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2020-12-16 16:52:46 +00:00
Lukas Wirth
dd496223f5
Node-ify lifetimes
2020-12-16 14:16:09 +01:00
bors[bot]
ece626fe81
Merge #6894
...
6894: Parenthesize composite if condition before inverting in invert-if assist r=matklad a=Jesse-Bakker
Fixes #6867
Co-authored-by: Jesse Bakker <github@jessebakker.com>
2020-12-16 08:20:11 +00:00
Jonas Schievink
c31c3246a8
Basic support for decl macros 2.0
2020-12-15 18:43:34 +01:00
Jesse Bakker
0f42a71806
Parenthesize composite if condition before inverting in invert-if assist
2020-12-15 16:25:57 +01:00
Jonas Schievink
479babf874
Reject visibilities on macro_rules!
2020-12-15 15:37:49 +01:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
Jeremy Kolb
26a1675764
Remove some redundant allocations
2020-12-12 12:27:09 -05:00
Aleksey Kladov
3d5be5ba5b
Fix accidently quadratic syntax rewriter
...
Switching from SyntaxNode to GreenNode is a costly operation (b/c
dereferencing a synax ptr in `with_green` is linear), so we should
avoid that.
2020-12-10 20:07:37 +03:00