Rollup merge of #38956 - theduke:document-field-init-shorthand-38830, r=steveklabnik

Update struct_expr grammar for field init shorthand.

Part of the work for #38830 .

r? @steveklabnik
This commit is contained in:
Steve Klabnik 2017-01-23 16:40:47 -05:00 committed by GitHub
commit fb5b0d033f

View File

@ -510,8 +510,9 @@ unit_expr : "()" ;
### Structure expressions
```antlr
struct_expr : expr_path '{' ident ':' expr
[ ',' ident ':' expr ] *
struct_expr_field_init : ident | ident ':' expr ;
struct_expr : expr_path '{' struct_expr_field_init
[ ',' struct_expr_field_init ] *
[ ".." expr ] '}' |
expr_path '(' expr
[ ',' expr ] * ')' |