Florian Diebold
16a7d8cc85
Add impl Trait
and dyn Trait
types
...
- refactor bounds handling in the AST a bit
- add HIR for bounds
- add `Ty::Dyn` and `Ty::Opaque` variants and lower `dyn Trait` / `impl Trait`
syntax to them
2019-08-22 19:33:00 +02:00
Aleksey Kladov
9f238930f1
Don't add ?
bounds as real bounds
...
closes #1709
2019-08-22 15:35:42 +03:00
Aleksey Kladov
deba1fedfa
⬆️ rustc_lexer
2019-08-20 19:53:05 +03:00
Aleksey Kladov
39e444d701
remove ast::*Kind enums
...
With the new owned trees, we don't need an indirection here
2019-08-19 13:58:49 +03:00
Aleksey Kladov
39f50e7bd7
use new quote-generated ast
2019-08-18 23:36:22 +03:00
Aleksey Kladov
8cefdb5527
use quote! macro to generate grammar
...
We already use syn"e elsewhere (transitively), so it make sense to
cut down on the number of technologies and get rid of tera
2019-08-18 23:11:08 +03:00
Aleksey Kladov
d545a5c75c
deserialize grammar
2019-08-18 21:54:51 +03:00
Aleksey Kladov
7e5a186c1f
Introduce separate hir::BinaryOp
...
Unlike ast::BinOp, it has significantly more structure to it, so it's
easier to, say, handle all assignment-like operations in the same way.
2019-08-17 17:42:41 +03:00
Aleksey Kladov
8919aa8065
implement accessors for IndexExpr
2019-08-17 17:17:01 +03:00
Aleksey Kladov
fd4c083e42
simplify
2019-08-17 17:14:22 +03:00
Florian Diebold
22724f37f3
Lower fully qualified associated type paths
...
I.e. `<T as Trait>::Foo`.
2019-08-12 21:43:00 +02:00
Aleksey Kladov
f3ee5a1509
Move numeric names inside of NameRef
2019-08-09 12:16:47 +02:00
Evgenii P
db4839033c
Change macro to function
2019-08-09 15:04:13 +07:00
Evgenii P
073cf42391
rustfmt
2019-08-09 14:23:13 +07:00
Evgenii P
f4a6d92050
Reduce code duplication in lexer by introducing small macro
2019-08-09 14:08:34 +07:00
Evgenii P
3fb58c620c
Add function parameters attributes
2019-08-07 23:42:28 +07:00
kjeremy
0f61aa1f09
Unconditionally trim the end of comments
2019-07-31 13:59:14 -04:00
kjeremy
d65dc40348
Removes */
in block doc comments
2019-07-31 11:43:00 -04:00
kjeremy
4fccad9b2c
Add explicit newline preserving tests
2019-07-31 10:46:15 -04:00
bors[bot]
a5fe9f7a87
Merge #1604
...
1604: Fix failing type interference for floating point literal r=matklad a=theotherphil
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1592
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
2019-07-29 19:02:39 +00:00
Phil Ellison
fab8e9bb8a
cargo format
2019-07-28 20:54:37 +01:00
Phil Ellison
4fd7ad908b
Add special case for f32 and f43 suffices on Literal.kind
2019-07-28 20:47:44 +01:00
Phil Ellison
578bc05ca4
Add issue link and trailing newline
2019-07-28 20:25:06 +01:00
Phil Ellison
fe1b1dd7d9
More direct failing test
2019-07-28 19:52:30 +01:00
Aleksey Kladov
459241f272
move syntax tests to unit tests
2019-07-24 12:49:19 +03:00
Aleksey Kladov
2473cb6a5c
switch to upstream unescape
2019-07-24 11:47:28 +03:00
Aleksey Kladov
700669bbd0
kill old lexer
2019-07-22 17:56:19 +03:00
Aleksey Kladov
75761c0e47
add rustc_lexer
2019-07-22 17:47:33 +03:00
Aleksey Kladov
773ad2edb3
simiplify
2019-07-21 13:34:15 +03:00
Aleksey Kladov
d52ee59a71
streamline API
2019-07-21 13:28:58 +03:00
Aleksey Kladov
62be91b82d
minor, move type
2019-07-21 13:08:32 +03:00
Aleksey Kladov
c9cfd57eea
switch to upstream rowan's API
2019-07-20 20:12:06 +03:00
bors[bot]
3983ccca4a
Merge #1566
...
1566: align SyntaxText API with upstream r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-20 13:52:33 +00:00
Aleksey Kladov
f6bcc2d745
align SyntaxText API with upstream
2019-07-20 16:52:11 +03:00
bors[bot]
dac6adbef9
Merge #1562
...
1562: Continue support for .await r=matklad a=unrealhoang
- add await expr to ast and HIR Expr
- infer type for `.await`
Co-authored-by: Unreal Hoang <unrealhoang@gmail.com>
2019-07-20 11:27:50 +00:00
Unreal Hoang
5ac9f5cdc7
add await expr to ast
2019-07-20 19:35:49 +09:00
bors[bot]
6b352ffeb3
Merge #1560
...
1560: move debug_dump to fmt::Debug r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-20 09:59:10 +00:00
Aleksey Kladov
f3bdbec1b6
rename range -> text_range
2019-07-20 12:58:27 +03:00
Aleksey Kladov
6d5d82e412
move debug_dump to fmt::Debug
2019-07-20 12:48:24 +03:00
Unreal Hoang
3a7f07c62d
add await to syntax, parser for await_expr
2019-07-20 17:41:31 +09:00
Aleksey Kladov
d92a88bf09
remove lifetime from syntax node text
2019-07-19 21:41:36 +03:00
Aleksey Kladov
0025299370
sane indexing in text
2019-07-19 20:55:32 +03:00
Aleksey Kladov
8467ba8cdb
flip syntax text to use internal iteration
2019-07-19 20:29:59 +03:00
Aleksey Kladov
8f032d6a58
drop memory size of subtree
...
it wasn't too accurate and the new measurement method of dropping the
database completely is better anyway
2019-07-19 19:55:54 +03:00
Aleksey Kladov
191a6ba330
convenience api
2019-07-19 19:05:34 +03:00
Aleksey Kladov
5c594bcb48
cleanup casts
2019-07-19 18:22:00 +03:00
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