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:
commit
fb5b0d033f
@ -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 ] * ')' |
|
||||
|
Loading…
Reference in New Issue
Block a user