Commit graph

38 commits

Author SHA1 Message Date
Aleksey Kladov
9f2574c97e add ability to get strcut field source 2019-01-25 20:38:03 +03:00
Aleksey Kladov
64d4f42558 reduce visibility 2019-01-25 14:25:30 +03:00
Aleksey Kladov
87ac5f5b36 use positional ids for fields 2019-01-25 14:21:14 +03:00
Aleksey Kladov
47e5536678 rename struct field -> struct field data 2019-01-25 12:58:01 +03:00
Aleksey Kladov
87288d802c pack enum variants into arena 2019-01-25 12:50:46 +03:00
Aleksey Kladov
2ee2fba752 switch to positional enum variants 2019-01-25 11:35:38 +03:00
Aleksey Kladov
31d3a56b18 move adt to adt 2019-01-25 01:53:07 +03:00
Aleksey Kladov
f588535273 remove boilerplate 2019-01-25 00:32:37 +03:00
Aleksey Kladov
4c514a3e02 move enum variant to the new API 2019-01-24 23:32:41 +03:00
Aleksey Kladov
11dda8a0fb remove useless aliases 2019-01-24 19:29:44 +03:00
Aleksey Kladov
566c8e321e migrate enums to new id 2019-01-24 18:56:38 +03:00
Aleksey Kladov
60a607d33f new struct id 2019-01-24 17:54:18 +03:00
Aleksey Kladov
3ab1519cb2 Change ids strategy
this is a part of larghish hir refactoring which aims to

* replace per-source-root module trees with per crate trees
* switch from a monotyped DedId to type-specific ids
2019-01-24 13:29:19 +03:00
Florian Diebold
688a45e00b Implement beginnings of generics
- add HIR for generic params
 - resolve generic params in type paths
 - add substitions for ADTs
 - insert type variables for substitutions
2019-01-19 16:02:06 +01:00
Aleksey Kladov
b871062e32 remove Cancelable from Ty 2019-01-15 20:43:37 +03:00
Aleksey Kladov
9446be2999 remove Cancelable from adt API 2019-01-15 18:43:25 +03:00
Marcus Klaas de Vries
e78286c8e8 Save variant names in EnumData to reduce needless queries
We already have their names when anyway, and when in all (current)
situations where we're interested in an Enum's variants, we want
their names.
2019-01-10 14:43:01 +01:00
Marcus Klaas de Vries
978de5cf8b Implement type inference for enum variants 2019-01-10 14:32:56 +01:00
Aleksey Kladov
56b2138d82 show field types in completion 2019-01-09 19:40:11 +03:00
Aleksey Kladov
54e5c4f085 minimize visibility 2019-01-08 15:40:02 +03:00
Aleksey Kladov
5edcf313f6 move query impls to adt 2019-01-08 15:38:29 +03:00
Aleksey Kladov
64f202bdd7 move variant public api to api 2019-01-08 15:32:27 +03:00
Aleksey Kladov
2d0ab52212 move variants to API 2019-01-08 15:28:08 +03:00
Aleksey Kladov
2d4dc22af8 move enum to code_model_api 2019-01-08 15:22:57 +03:00
Aleksey Kladov
e30c533eb6 move stuct to code_model_api 2019-01-08 15:19:37 +03:00
Aleksey Kladov
50d5e37481 convert some if-lets to match 2019-01-08 14:23:00 +03:00
Aleksey Kladov
da0b348ae9 migrate ra_hir to rowan 2.0 2019-01-08 11:28:42 +03:00
Aleksey Kladov
42cc77703b move more stuff to ids 2019-01-02 00:30:00 +03:00
Aleksey Kladov
7928995876 nameify structs&enums 2018-12-28 21:34:58 +03:00
Aleksey Kladov
11122e29b7 completion for enum variants 2018-12-28 21:07:47 +03:00
Florian Diebold
bc745a1396 Resolve field types lazily
I.e. not already when getting the HIR for the struct.
2018-12-25 21:40:33 +01:00
Florian Diebold
cdca397061 Add a hir::TypeRef as an intermediate between ast::TypeRef and ty::Ty 2018-12-25 21:14:13 +01:00
Florian Diebold
b96d361239 Handle structs/enums with missing names a bit better 2018-12-25 17:55:50 +01:00
Florian Diebold
ab0b63992b Implement basic completion for fields 2018-12-25 15:27:15 +01:00
Florian Diebold
55c941cd9f Type field accesses 2018-12-25 15:16:42 +01:00
Florian Diebold
07a7285965 Collect field data for structs/enum variants 2018-12-25 15:16:42 +01:00
Florian Diebold
6fcd38cc81 Infer result of struct literals, and recurse into their child expressions 2018-12-25 15:16:42 +01:00
Florian Diebold
b5b68f2094 Add basic HIR and types for structs/enums 2018-12-25 15:16:42 +01:00