diff options
author | Evgenii P <[email protected]> | 2019-08-09 09:38:52 +0100 |
---|---|---|
committer | Evgenii P <[email protected]> | 2019-08-09 09:38:52 +0100 |
commit | 957b5ed23a4860fe3c9b80687a801b5d7870fe00 (patch) | |
tree | 2aee1c7a0bd9a0160182a7525ef036c2c111f187 /crates/ra_parser/src/grammar | |
parent | 2fbec23d9990147e09a3b819c37dc1467a5e95d4 (diff) |
Parse tuple struct field initialization
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 3e49e70c7..50c938a23 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -572,6 +572,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) { | |||
572 | // S {}; | 572 | // S {}; |
573 | // S { x, y: 32, }; | 573 | // S { x, y: 32, }; |
574 | // S { x, y: 32, ..Default::default() }; | 574 | // S { x, y: 32, ..Default::default() }; |
575 | // TupleStruct { 0: 1 }; | ||
575 | // } | 576 | // } |
576 | pub(crate) fn named_field_list(p: &mut Parser) { | 577 | pub(crate) fn named_field_list(p: &mut Parser) { |
577 | assert!(p.at(T!['{'])); | 578 | assert!(p.at(T!['{'])); |
@@ -583,7 +584,7 @@ pub(crate) fn named_field_list(p: &mut Parser) { | |||
583 | // fn main() { | 584 | // fn main() { |
584 | // S { #[cfg(test)] field: 1 } | 585 | // S { #[cfg(test)] field: 1 } |
585 | // } | 586 | // } |
586 | IDENT | T![#] => { | 587 | IDENT | INT_NUMBER | T![#] => { |
587 | let m = p.start(); | 588 | let m = p.start(); |
588 | attributes::outer_attributes(p); | 589 | attributes::outer_attributes(p); |
589 | name_ref(p); | 590 | name_ref(p); |