Florian Diebold
bb029cd29b
Rename traits::impl_item -> impl_block as well, as well as the tests
2019-01-04 19:15:15 +01:00
Florian Diebold
111126ed3c
Type the self parameter
2019-01-04 19:10:50 +01:00
Florian Diebold
ae9530addc
Add HIR for impl blocks
...
Since we need to be able to go from def to containing impl block, as well as the
other direction, and to find all impls for a certain type, a design similar to
the one for modules, where we collect all impls for the whole crate and keep
them in an arena, seemed fitting. The ImplBlock type, which provides the public
interface, then consists only of an Arc to the arena containing all impls, and
the index into it.
2019-01-04 19:10:47 +01:00
Florian Diebold
fe6c4115f6
Rename ImplItem to ImplBlock
...
rustc uses the name ImplItem for items in impls, not the impl {} block itself,
which could lead to confusion.
2019-01-04 18:28:36 +01:00
csmoe
a0ef196d04
add mod doc comments test in ast
2019-01-04 21:51:45 +08:00
csmoe
f604ff5b2f
parse doc comment for items
2019-01-04 21:29:00 +08:00
bors[bot]
6295bbe6ec
Merge #391
...
391: docing parser methods r=csmoe a=csmoe
Co-authored-by: csmoe <csmoe@msn.com>
2019-01-04 04:36:40 +00:00
csmoe
58139c558a
consume trivias for type/const def
2019-01-04 12:22:57 +08:00
csmoe
df591a1e48
doc parsing events
2019-01-04 12:21:47 +08:00
Aleksey Kladov
a4635a199b
more enterprisey assists API
2019-01-03 18:59:17 +03:00
Aleksey Kladov
0a80d9685a
visibility owner
2019-01-03 15:21:31 +03:00
Aleksey Kladov
756e878158
add items from macros to modules
2019-01-01 22:15:35 +03:00
Aleksey Kladov
7dc45745a3
save top-level macros in module items
2019-01-01 22:15:35 +03:00
DJMcNab
0ddeb3b824
Fix the same bug as #396 but for bytes too
2019-01-01 12:10:21 +00:00
DJMcNab
0fd87cbc47
Use an else if
2019-01-01 11:10:08 +00:00
csmoe
b01e707dba
doc parser input
2019-01-01 16:09:32 +08:00
DJMcNab
72ab6f7727
Fix the panic
found whilst fuzzing
2018-12-31 23:02:04 +00:00
csmoe
ea7b569e1b
docing parser methods
2018-12-31 21:00:05 +08:00
bors[bot]
c0d1b17a4e
Merge #366
...
366: parse minus before number literal pattern r=matklad a=csmoe
r?@matklad
![unknown](https://user-images.githubusercontent.com/35686186/50547871-d5449e00-0c7d-11e9-9ff5-1031e78019de.png )
Co-authored-by: csmoe <csmoe@msn.com>
2018-12-30 16:40:16 +00:00
csmoe
53c94e3ad8
parse minus before number literal
2018-12-30 23:25:07 +08:00
DJMcNab
054f22f231
Fix a fuzzing bug and add Cargo.lock to the fuzzing directory
2018-12-29 12:40:08 +00:00
Aleksey Kladov
406505e096
super simplistic macro expansion
2018-12-28 16:59:58 +03:00
Aleksey Kladov
072028e679
add macro-call node
2018-12-28 13:27:30 +03:00
Aleksey Kladov
49b0fe20ab
fix suffix ranges
2018-12-27 15:10:30 +03:00
Aleksey Kladov
a912b261d3
dump validation errors
2018-12-27 15:07:51 +03:00
Aleksey Kladov
359e70d1b2
support literal suffixes
2018-12-27 15:03:18 +03:00
Aleksey Kladov
73ded3c63c
dedupe literal parsers
2018-12-27 14:42:46 +03: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
2870effd5c
Implement reference / pointer types
...
- parse them
- infer types of & and * expressions
2018-12-25 20:36:06 +01:00
Florian Diebold
ab0b63992b
Implement basic completion for fields
2018-12-25 15:27:15 +01:00
Florian Diebold
0d724ea572
Improve parsing of incomplete field accesses in preparation for field completion
...
We need to be able to get the receiver even if there is no field name yet, and
currently "a." wouldn't get parsed as a field name at all. This seems to help.
2018-12-25 15:16:42 +01:00
Florian Diebold
55c941cd9f
Type field accesses
2018-12-25 15:16:42 +01:00
Florian Diebold
4cb7b0f2af
Add AST definitions for struct/variant fields etc.
...
Fixes #117
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
ef67581104
Resolve paths to defs (functions currently) during type inference
2018-12-23 17:13:11 +01:00
Florian Diebold
93ffbf80c6
Make let statements kind of work
2018-12-23 14:01:50 +01:00
Florian Diebold
3899898d75
Parse integer / float types
2018-12-23 13:48:04 +01:00
Florian Diebold
3ac605e687
Add beginnings of type infrastructure
2018-12-23 13:48:04 +01:00
bors[bot]
e4d0930d9c
Merge #316
...
316: Fix handling of nested self in paths r=matklad a=DJMcNab
See https://github.com/rust-analyzer/rust-analyzer/issues/231#issuecomment-442449505 .
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 23:19:14 +00:00
DJMcNab
4dbf71d332
Remove uneeded todo in lexer
2018-12-21 22:41:09 +00:00
DJMcNab
d8d60215da
Fix handling of nested self in paths
2018-12-21 22:29:59 +00:00
DJMcNab
bd5a358910
Fix where clauses using fully qualified path syntax
2018-12-21 17:20:38 +00:00
Aleksey Kladov
a5987bd715
show debug repr of literals
2018-12-21 18:49:52 +03:00
DJMcNab
55ebe449c9
Fix parsing of contextual_keyword union
2018-12-20 19:46:03 +00:00
DJMcNab
1d1950336f
Use a better way of skipping SEMIs
2018-12-20 19:07:11 +00:00
DJMcNab
dc1c64f5b9
Support a blank expression before a semicolon
2018-12-20 19:07:11 +00:00
DJMcNab
134fe4f566
Fix the tests and fix the precommit hook
2018-12-20 16:45:54 +00:00
DJMcNab
466885aa5b
Fix missing DOTDOTEQs
2018-12-20 16:22:13 +00:00
DJMcNab
f35151afed
Don't require a command before EQ in a where clause
2018-12-20 15:50:42 +00:00
DJMcNab
27e814e182
Simplify NO_BLOCK testing
2018-12-20 12:28:59 +00:00