DJMcNab
def0a95d35
Revert "Revert to f6f7c5"
...
This approach is correct, but it needs an addition to Restrictions too
This reverts commit ad00d0c8a5f64142e6636e8b048204c8f8982f4a.
2018-12-19 20:12:18 +00:00
DJMcNab
4dce66ad31
Fix handling of structs in match arms
2018-12-19 20:12:18 +00:00
DJMcNab
cd8e33fb7e
Revert to f6f7c5
2018-12-19 20:12:18 +00:00
DJMcNab
7a8560ba38
Fix expression parsing by bailing out upon a macro block being found
...
TODO: Fix this when the block like macro is in expression position
E.g. `test(test!{})` currently parses
2018-12-19 20:12:18 +00:00
DJMcNab
97e70bf50f
Possibly fix #225
2018-12-19 20:12:18 +00:00
DJMcNab
29bf389034
Actually fix at_ts doc comment (committed wrong file :P)
2018-12-19 20:12:18 +00:00
DJMcNab
012537bd6c
Fix at_ts doc comment
2018-12-19 20:12:18 +00:00
DJMcNab
20bbe0127c
Fix parsing of inclusive ranges ( #214 )
...
I'm not certain that this is correct, so extra eyes would be good
2018-12-19 20:12:18 +00:00
DJMcNab
0b77eec922
Add a test to ensure that we can parse each file
...
Note that this has a non-spurious failure in ra_analysis/src/mock_analysis
2018-12-19 20:12:18 +00:00
Roland Ruckerbauer
d0f1334226
Fixed cast expression parsing in ra_syntax.
...
The cast expression expected any type via types::type_() function,
but the language spec does only allow TypeNoBounds (types without direct extra bounds
via `+`).
**Example:**
```rust
fn test() {
6i8 as i32 + 5;
}
```
This fails, because the types::type_() function which should parse the type after the
as keyword is greedy, and takes all plus sign after path types as extra.
My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`)
function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers.
This function is then called by `type_()` and the new public `type_no_bounds()`.
2018-12-17 17:26:24 +01:00
Aleksey Kladov
8d42deeac3
fix installation on windows
2018-12-17 11:26:41 +03:00
Bernardo
0527e3b283
rename Edit to TextEdit and AtomEdit to AtomTextEdit
2018-12-11 19:07:17 +01:00
Bernardo
7344d28768
extract AtomEdit and Edit into new ra_text_edit crate
2018-12-10 22:09:12 +01:00
Bernardo
a062d844c2
use \b as word boundary
2018-12-09 15:50:56 +01:00
bors[bot]
3725276554
Merge #271
...
271: Implement format hook r=matklad a=DJMcNab
Tentatively: fixes #155 .
However, this does add all changes in staged files, which might not be desirable. However, I think we can't solve that without explicit support in rustfmt for it, so it should be fine.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-09 12:44:58 +00:00
DJMcNab
cbce28a348
Reimplement format-hook using a rust binary
2018-12-09 12:27:13 +00:00
Aleksey Kladov
b9c17a6001
Answer canceled requests
2018-12-09 14:43:02 +03:00
Aleksey Kladov
5004cb928b
verbose assertions in SourceFileItems
2018-12-09 14:21:54 +03:00
Aleksey Kladov
7784c7a701
resolve extern crates propertly
2018-12-09 13:49:54 +03:00
DJMcNab
279ff4927a
Update hook to not add unstaged files
2018-12-09 10:37:04 +00:00
Aleksey Kladov
e89da32bb7
move tests to separate file
2018-12-09 13:33:16 +03:00
Aleksey Kladov
6a16d3fb0b
WIP: resolve across crates
2018-12-09 13:33:16 +03:00
Aleksey Kladov
8b9ff46b37
make resolver fields private
2018-12-09 13:33:16 +03:00
Aleksey Kladov
74fe581061
return dependencies with names
2018-12-09 13:33:16 +03:00
Aleksey Kladov
961cae7e53
thread info about dep names
2018-12-09 13:33:16 +03:00
Aleksey Kladov
ca7e5905c1
more crate boilerplate
2018-12-09 13:33:16 +03:00
Aleksey Kladov
9c6c7ec2da
hir::Crate boilerplate
2018-12-09 13:33:16 +03:00
Aleksey Kladov
9b1356464a
propagate deps to CrateGraph
2018-12-09 13:33:16 +03:00
Aleksey Kladov
32c067f8c9
track deps in project model
2018-12-09 13:33:16 +03:00
DJMcNab
e823db0698
Implement and test format hook
2018-12-09 10:29:13 +00:00
Aleksey Kladov
159525b120
Check Fileid in SourceFileMap
2018-12-09 13:18:46 +03:00
Aleksey Kladov
13100da7a2
switch threadpool back from rayon to threadpool
...
rayon does not replenish the pool when the thread panics, but we must
be reselient to bugs.
2018-12-09 13:13:36 +03:00
bors[bot]
904438e993
Merge #267
...
267: Fix the extend keybinding r=DJMcNab a=DJMcNab
Make the extend selection keybinding less annoying for users not used to Injelli-J (myself included). Also fixes a minor style issue and runs `npm update`.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-09 09:09:07 +00:00
DJMcNab
bb0c2eb8d9
Fix cargo format component name and run rustfmt
2018-12-09 09:08:10 +00:00
DJMcNab
12addc6233
Add package command and upgrade event-stream
2018-12-08 21:09:32 +00:00
Bernardo
6fb267f5da
find next whitespace or begining or end
2018-12-08 20:53:03 +01:00
bors[bot]
97b07ac393
Merge #265
...
265: Refactor symbol resolve API r=matklad a=matklad
Introduce ReferenceResolution to avoid nesting to many non-nominal
types.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-08 18:20:11 +00:00
Aleksey Kladov
7fd6a41127
Refactor symbol resolve API
...
Introduce ReferenceResolution to avoid nesting to many non-nominal
types.
2018-12-08 21:18:29 +03:00
bors[bot]
51f669606c
Merge #263
...
263: New modules r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-08 17:55:17 +00:00
Aleksey Kladov
7a79cde107
account for new layout when collecting tests
2018-12-08 20:54:44 +03:00
bors[bot]
5ad7547ce2
Merge #264
...
264: check for empty range when extending in comment r=matklad a=vemoo
fix for #140
Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-08 17:43:15 +00:00
Bernardo
c22e901403
check for empty range when extending in comment
2018-12-08 18:26:19 +01:00
Aleksey Kladov
4cbc902fcc
grand module rename
2018-12-08 19:30:35 +03:00
Aleksey Kladov
93c0b7d794
resolve 2018 style modules
2018-12-08 19:28:35 +03:00
Aleksey Kladov
e096867ada
reformat
2018-12-08 19:28:24 +03:00
DJMcNab
f88e0700e6
Add a better text for hover and stop duplicating work done in approximatelly_resolve_symbol
2018-12-08 19:28:10 +03:00
DJMcNab
6d548d944f
Fix typo in comment
2018-12-08 19:28:10 +03:00
DJMcNab
89cf7d8743
Clarify and correct comment about multi_byte_tokens
2018-12-08 19:28:10 +03:00
DJMcNab
3d3026dc60
Fix the range of a hover request to be more in line with prior art
2018-12-08 19:28:10 +03:00
Florian Diebold
29793e7de9
Add test for code actions
2018-12-06 21:32:15 +01:00