rust/crates/ra_syntax/src/grammar
bors[bot] 97ade89993 Merge #692
692: [WIP] Correctly parse attributes  r=matklad a=DJMcNab

Reference - https://doc.rust-lang.org/reference/attributes.html
This fixes/investigates inner attributes for:

- [x] `impl` blocks
- [x] `extern` blocks
- [x] `fn`s (fixes #689)
- [x] `mod`s (already supported)
- [x] 'block expressions' (the long text just describes all 'blocks' used as statements)

This also investigates/fixes outer attributes for:

- [ ] 'most statements' (see also: #685, https://doc.rust-lang.org/reference/expressions.html#expression-attributes)
- [x] Enum variants, Struct and Union fields (Fixed in #507)
- [ ] 'Match expression arms' (@matklad can you provide a test case which explains what this means?)
- [ ] 'Generic lifetime or type parameters'
- [ ] 'Elements of array expressions, tuple expressions, call expressions, tuple-style struct and enum variant expressions'
- [ ] 'The tail expression of block expressions'

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2019-01-31 07:06:31 +00:00
..
expressions Infer type of match guard 2019-01-28 23:09:14 +01:00
items Correctly parse inner attributes of impl blocks 2019-01-27 14:55:03 +00:00
attributes.rs rename all things 2018-09-16 13:07:39 +03:00
expressions.rs Parse and validate attributes in blocks 2019-01-28 20:03:56 +00:00
items.rs Make attrs be a child of the let statement 2019-01-26 22:02:23 +00:00
params.rs Add test for placeholder parameters in trait fn defs 2019-01-22 18:46:15 +01:00
paths.rs Complete paths after :: 2018-11-21 18:34:20 +03:00
patterns.rs Change parsing of struct field patterns 2019-01-19 15:37:26 +03:00
type_args.rs Fix the tests and fix the precommit hook 2018-12-20 16:45:54 +00:00
type_params.rs No need for is_type_start 2019-01-22 14:46:06 +01:00
types.rs Support macro calls in type position 2019-01-25 23:56:31 +01:00