Aleksey Kladov
f9d9e0a1f7
several highlighting cleanups
...
* make stuff more type-safe by using `BindPat` instead of just `Pat`
* don't add `mut` into binding hash
* reset shadow counter when we enter a function
2019-07-19 16:09:32 +03:00
Aleksey Kladov
0343c4a815
migrate ra_assists to the new AST
2019-07-19 13:16:25 +03:00
Aleksey Kladov
e2b28f5bb8
migrate ra_hir to the new rowan
2019-07-19 13:16:25 +03:00
Aleksey Kladov
d402974aa0
migrate ra_syntax to the new rowan API
2019-07-19 13:16:24 +03:00
Aleksey Kladov
df33e7685b
use Parse in mbe
2019-07-18 23:19:04 +03:00
Aleksey Kladov
a6224f3620
make Parse generic
2019-07-18 22:55:04 +03:00
Aleksey Kladov
1edec77e58
cleanup imports
2019-07-18 20:16:33 +03:00
Ekaterina Babshukova
4abe03879b
highlight mutable variables differently
2019-07-18 18:52:50 +03:00
Aleksey Kladov
0fb4b896e2
use more correct phantom types for ptrs
2019-07-18 18:13:32 +03:00
Aleksey Kladov
deab4caa7b
make Parse fields private
...
this is in preparation for the new rowan API
2019-07-12 19:41:13 +03:00
Pascal Hertleif
6e87065968
Make clippy a bit happier
...
Random drive-by fix. I honestly blame rust-analyzer itself on this,
because I set its watch mode to use `cargo clippy` 🤷
2019-07-10 17:05:39 +02:00
Pascal Hertleif
d0ff53de2d
Resolve a FIXME
...
Now that we are using a newer smol_str release this can be simplified :)
2019-07-10 17:04:38 +02:00
Jeremy Kolb
6b4ec73b7e
Clippy changes
2019-07-04 23:00:00 -04:00
Jeremy Kolb
4ad9e986ad
Some clippy fixes for 1.36
2019-07-04 17:43:00 -04:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
csmoe
d6533994e4
fix: box_pattern
...
Change-Id: I45a856d74fb616d3bce33050f9e69d327186bd59
2019-06-19 14:28:50 +08:00
Shotaro Yamada
774537fb01
Fix formatting
2019-06-16 01:45:38 +09:00
Shotaro Yamada
474a04615c
Skip attrs in Literal::token
2019-06-15 23:36:12 +09:00
Muhammad Mominul Huque
f032eeb05f
Get rid of failure: ra_batch ra_cli
2019-06-15 13:24:02 +06:00
csmoe
2ca9f71897
fix: support existential type
2019-06-12 14:32:39 +00:00
Andrey Tkachenko
281c9eeaff
[ #1083 ] Try block syntax
2019-06-06 15:43:26 +04:00
csmoe
44363cd5d2
fix: clean up warnings
...
Change-Id: I91a468f6e846ac28574825b8ee7aa02fbff68f63
2019-06-06 10:06:46 +08:00
Alan Du
b28ca32db2
Fix clippy::or_fun_call
2019-06-04 18:05:07 -04:00
Alan Du
ed3d93b875
Fix clippy::single_char_pattern
2019-06-04 18:05:07 -04:00
Aleksey Kladov
38cb88307e
flip Into to From
2019-05-29 10:31:07 +03:00
Aleksey Kladov
2e722ec54b
show error offsets in tests
2019-05-29 10:31:07 +03:00
Aleksey Kladov
0efbcdf435
remove old parsing methods
2019-05-28 17:34:28 +03:00
Aleksey Kladov
310bfe57bd
update test data
2019-05-28 17:09:45 +03:00
Aleksey Kladov
bc2550b196
update tests
2019-05-28 16:59:22 +03:00
Aleksey Kladov
afeaea7051
drop error from SOurceFile constructor
2019-05-28 16:34:23 +03:00
Aleksey Kladov
1cece9f219
return errors from tree builder
2019-05-28 16:26:14 +03:00
Aleksey Kladov
90926b9479
drop errors from SyntaxNode
2019-05-28 16:15:17 +03:00
Aleksey Kladov
f52eda675e
add Parse
2019-05-28 16:15:17 +03:00
Pascal Hertleif
1e6ba19015
Make rainbows optional
2019-05-27 11:44:46 +02:00
Pascal Hertleif
43d5a49653
More clever highlighting, incl draft for structs
2019-05-27 11:26:35 +02:00
Pascal Hertleif
ed89b0638b
Hash based on binding name and shadow counter
2019-05-27 11:26:35 +02:00
Pascal Hertleif
5bf3e949e8
Semantic highlighting spike
...
Very simple approach: For each identifier, set the hash of the range
where it's defined as its 'id' and use it in the VSCode extension to
generate unique colors.
Thus, the generated colors are per-file. They are also quite fragile,
and I'm not entirely sure why. Looks like we need to make sure the
same ranges aren't overwritten by a later request?
2019-05-27 11:26:33 +02:00
Edwin Cheng
fcb1eef323
Change TokenSource to iteration based
2019-05-25 20:41:03 +08:00
Aleksey Kladov
765f93b8d8
add is_union to structs AST
2019-05-21 01:15:56 +03:00
Aleksey Kladov
e29a58995b
⬆️ text_unit
2019-05-15 19:19:05 +03:00
Sergey Parilin
993abedd77
apply T! macro where it is possible
2019-05-15 15:35:47 +03:00
Aleksey Kladov
549728bba8
make AstId untyped
2019-05-13 19:39:06 +03:00
bors[bot]
033a32f349
Merge #1257
...
1257: Implemented tkn! macro for syntax kinds r=matklad a=pasa
Implementation of #1248
Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-05-13 13:49:14 +00:00
Sergey Parilin
57bb618fd3
Implemented T! macro for syntax kinds
2019-05-13 15:19:57 +03:00
Florian Diebold
d6dc75f9f2
Handle auto traits & negative impls
...
We don't pass field types to Chalk yet though, so the auto trait inference won't
be correct.
2019-05-11 16:21:20 +02:00
Aleksey Kladov
313314e14b
share literal validation logic with compiler
2019-05-07 19:41:59 +03:00
Sergey Parilin
26ed925685
fill struct fields diagnostic
2019-05-06 17:16:11 +03:00
bors[bot]
aa7bdfd37f
Merge #1208
...
1208: [WIP] Goto for Macro's r=matklad a=Lapz
Adds goto definition for macros. Currently only works for macros in the current crate ~~otherwise it panics~~. Proper macro resolution needs to be added for it to resolve macros in other crates.
Todo
- [X] Allow goto from macro calls
- [X] Fix panics
- [x] Add tests
![Screen Recording 2019-04-25 at 18 00 24](https://user-images.githubusercontent.com/19998186/56754499-1dd01c00-6785-11e9-9e9a-1e36de70cfa3.gif )
Co-authored-by: Lenard Pratt <l3np27@gmail.com>
2019-05-04 18:38:10 +00:00
Lenard Pratt
8198e13c26
Added local macro goto
2019-05-04 17:39:51 +01:00
Aleksey Kladov
8876f44054
Revert "eagarly clean astd maps"
...
This reverts commit 6c63a59425
.
This causes massive slowdowns: looks like we accidentally have some source-depndent
2019-05-04 16:04:34 +03:00