Edwin Cheng
92665358cd
Rename ImplItem to AssocItem
2020-05-05 23:56:10 +08:00
Aleksey Kladov
4f2134cc33
Introduce EffectExpr
2020-05-02 11:21:39 +02:00
Aleksey Kladov
8a04372fec
Fix panic in split_imports assist
...
The fix is admittedly quit literally just papering over.
Long-term, I see two more principled approaches:
* we switch to a fully tree-based impl, without parse . to_string
step; with this approach, there shouldn't be any panics. The results
might be nonsensical, but so was the original input.
* we preserve the invariant that re-parsing constructed node is an
identity, and make all the `make_xxx` method return an `Option`.
closes #4044
2020-04-20 16:34:01 +02:00
Aleksey Kladov
4560fe2abf
Generate only minimal set of ineresting tokens
2020-04-10 16:10:28 +02:00
Aleksey Kladov
460c8bbdec
Curley tokens
2020-04-10 16:10:28 +02:00
Aleksey Kladov
c8b4c36f81
Semicolon token
2020-04-10 16:10:28 +02:00
Aleksey Kladov
e07d3c94de
Remove code duplication
2020-04-09 22:22:58 +02:00
Aleksey Kladov
2bfb65db93
Be consistent about token accesors
2020-04-09 18:48:13 +02:00
Aleksey Kladov
e6d22187a6
Add _token suffix to token accessors
...
I think this makes is more clear which things are : AstNode and which
are : AstToken
2020-04-09 18:25:36 +02:00
Luca Barbieri
60f4d7bd8c
Provide more complete AST accessors to support usage in rustc
2020-04-09 11:50:37 +02:00
Aleksey Kladov
2fe6e23138
When adding match arm, don't let the floating comma
2020-03-31 14:52:20 +02:00
Aleksey Kladov
0cfa9eb445
Use IntoIter
2020-03-30 12:28:22 +02:00
Matthew Hall
ddb9cc47d1
Tidy up insertion position logic
2020-03-29 12:45:15 +01:00
Matthew Hall
b8b271d984
Remove unneeded variables
2020-03-29 12:32:01 +01:00
Matthew Hall
ecc2615ba2
Append new match arms rather than replacing all of them
...
This means we now retain comments when filling in match arms.
2020-03-28 20:58:46 +00:00
Piotr Szpetkowski
f016d8b900
Fix merge-imports assist for wildcard imports
2020-03-27 17:28:25 +01:00
Aleksey Kladov
91e482b46d
Replace if with if-let
2020-03-27 12:15:46 +01:00
bors[bot]
9690f6bc43
Merge #3708
...
3708: Generalise syntax rewriting infrastructure to allow removal of nodes r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-24 16:15:08 +00:00
Aleksey Kladov
062f6e3bbe
Generalise syntax rewriting infrastructure to allow removal of nodes
2020-03-24 17:14:33 +01:00
Aleksey Kladov
9bf2cd609c
Align naming
2020-03-24 12:56:07 +01:00
Aleksey Kladov
3f6dc20d3c
Merge imports assist
...
Work towards #2220
2020-03-18 19:34:47 +01:00
Aleksey Kladov
4e50efcfc5
Strongly-typed generic methods for editing nodes
2020-03-18 19:34:47 +01:00
Aleksey Kladov
85e2346b74
Simplify creation of T[,]
2020-03-06 15:38:48 +01:00
Aleksey Kladov
ea0c124219
Rerail split_import API onto AST
...
The code is more verbose and less efficient now, but should be
reusable in add_import context as well
2020-03-06 14:08:43 +01:00
Aleksey Kladov
381ace587e
Add with_use_tree
2020-03-05 18:38:52 +01:00
Aleksey Kladov
5f8b37563e
Cleanup editing API
2020-02-29 13:51:23 +01:00
Aleksey Kladov
ef1326ee19
More orthogonal path editing
2020-01-15 18:48:28 +01:00
Aleksey Kladov
7d2d3ac3db
More fluent API
2020-01-15 18:30:23 +01:00
Aleksey Kladov
c84010e246
Slightly more fluent API
2020-01-15 18:14:49 +01:00
Aleksey Kladov
8296d3208d
Simplify
2020-01-15 18:01:05 +01:00
Aleksey Kladov
448575aa4a
Simplify
2020-01-15 18:01:05 +01:00
Florian Diebold
15fc643e05
Fix ordering problem between qualifying paths and substituting params
2020-01-11 23:33:04 +01:00
kjeremy
f22aabc136
Use unwrap_or_default
2019-12-20 09:43:30 -05:00
bravomikekilo
adac4fc2f2
do refact and fix some issue
2019-11-24 13:14:57 +08:00
Aleksey Kladov
4cea6bb6f1
Make make:: builders slightly more convenient
2019-11-13 11:59:18 +03:00
Mikhail Modin
fb215dc192
Adds "replace with guarded return" assist
2019-10-20 19:14:32 +01:00
Aleksey Kladov
c00f298fd2
add syntax-tree based indents
2019-10-12 22:07:47 +03:00
Aleksey Kladov
4acadbdca6
cleanup editor
2019-09-30 10:08:28 +03:00
Aleksey Kladov
05ca252fb5
remove ast_editor.rs
2019-09-30 10:05:12 +03:00
Aleksey Kladov
054c53aeb9
move remove bounds to ast/edit.rs
2019-09-30 09:56:20 +03:00
Aleksey Kladov
e010b144d5
move field list to ast/edit.rs
2019-09-30 09:27:26 +03:00
Aleksey Kladov
0840ec038b
migrate add impl items to the new editing API
2019-09-28 20:10:53 +03:00
Aleksey Kladov
5dbbfda34a
simplify strip attrs
2019-09-28 19:50:16 +03:00
Aleksey Kladov
d847d53e36
Start simplifying editing API
2019-09-26 22:22:08 +03:00