rust/crates/ra_syntax/src
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
..
algo
ast Merge #692 2019-01-31 07:06:31 +00:00
grammar Merge #692 2019-01-31 07:06:31 +00:00
lexer Add raw idents to lexer and parser 2019-01-23 13:17:41 -05:00
parser_impl Add docs to struct fields 2019-01-25 14:29:56 -05:00
string_lexing
syntax_kinds rename POS_FIELD -> POS_FIELD_DEF 2019-01-26 00:24:12 +03:00
validation Parse and validate attributes in blocks 2019-01-28 20:03:56 +00:00
yellow Parse and validate attributes in blocks 2019-01-28 20:03:56 +00:00
algo.rs Typos 2019-01-27 15:19:42 +01:00
ast.rs Merge #662 2019-01-27 08:21:04 +00:00
grammar.ron Merge #692 2019-01-31 07:06:31 +00:00
grammar.rs Use IDENT for both raw and normal idents 2019-01-23 13:19:49 -05:00
lexer.rs More correct raw ident handling 2019-01-23 13:57:17 -05:00
lib.rs introduced better typed AstPtr 2019-01-23 18:26:02 +03:00
parser_api.rs Use IDENT for both raw and normal idents 2019-01-23 13:19:49 -05:00
parser_impl.rs
ptr.rs minor rename 2019-01-24 13:40:36 +03:00
reparsing.rs Use IDENT for both raw and normal idents 2019-01-23 13:19:49 -05:00
string_lexing.rs
syntax_kinds.rs
token_set.rs
utils.rs
validation.rs Parse and validate attributes in blocks 2019-01-28 20:03:56 +00:00
yellow.rs use ToOwned trait instead of inherent method 2019-01-25 02:09:31 +03:00